longlong.h: Disable alpha umul_ppmm for old g++
authorRichard Henderson <rth@redhat.com>
Tue, 28 Oct 2014 20:22:40 +0000 (13:22 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 28 Oct 2014 20:22:40 +0000 (13:22 -0700)
Causes "unexpected AST of kind MULT_HIGHPART" error with
bootstrap from gcc 4.8.

        * longlong.h [__alpha] (umul_ppmm): Disable for c++.

From-SVN: r216811

include/ChangeLog
include/longlong.h

index d2d14721f093872cb08ac93f71fa282e8c37ad03..e48268296bfab1c177acdb177247741753305f4e 100644 (file)
@@ -1,3 +1,7 @@
+2014-10-28  Richard Henderson  <rth@redhat.com>
+
+       * longlong.h [__alpha] (umul_ppmm): Disable for c++.
+
 2014-10-28  Yury Gribov  <y.gribov@samsung.com>
 
        * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
index 42c68ddd62d7a0920f5a219edc28991a8d935c5f..8cd2c79898c1449c108254442175cac925d1ed7f 100644 (file)
@@ -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;                                                    \