This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/3] longlong.h: Disable alpha umul_ppmm for old g++ [committed]
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 7 Jan 2016 17:36:40 -0500
- Subject: [PATCH 1/3] longlong.h: Disable alpha umul_ppmm for old g++ [committed]
- Authentication-results: sourceware.org; auth=none
- References: <1452206202-19724-1-git-send-email-vapier at gentoo dot org>
From: Richard Henderson <rth@redhat.com>
Causes "unexpected AST of kind MULT_HIGHPART" error with bootstrap from gcc 4.8.
---
ChangeLog | 4 ++++
stdlib/longlong.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a3c4d8e..ce42df8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-07 Richard Henderson <rth@redhat.com>
+
+ * longlong.h [__alpha] (umul_ppmm): Disable for c++.
+
2016-01-07 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/fxstat64.c (___fxstat64): Change
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 650ef31..1bc3e65 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attribute_hidden;
#endif /* __aarch64__ */
#if defined (__alpha) && W_TYPE_SIZE == 64
+/* There is a bug in g++ before version 5 that
+ errors on __builtin_alpha_umulh. */
+#if !defined(__cplusplus) || __GNUC__ >= 5
#define umul_ppmm(ph, pl, m0, m1) \
do { \
UDItype __m0 = (m0), __m1 = (m1); \
@@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden;
(pl) = __m0 * __m1; \
} while (0)
#define UMUL_TIME 46
+#endif /* !c++ */
#ifndef LONGLONG_STANDALONE
#define udiv_qrnnd(q, r, n1, n0, d) \
do { UDItype __r; \
--
2.6.2