--- a/acinclude.m4 +++ b/acinclude.m4 @@ -563,17 +563,26 @@ # __builtin_alloca is not available everywhere, check it exists before # seeing that it works GMP_PROG_CC_WORKS_PART_TEST([$1],[__builtin_alloca availability], -[int k; int foo () { __builtin_alloca (k); }], +[ +#include +int k; +int foo (); +int foo () { __builtin_alloca (k); return 0; } +int main () { return 0; } +], [GMP_PROG_CC_WORKS_PART([$1], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ +#include int k; +int foo (); int foo () { int i, **a; a = __builtin_alloca (k); for (i = 0; i <= k; i++) a[i] = __builtin_alloca (1 << i); + return 0; } ])]) @@ -587,6 +596,9 @@ #if defined(__GNUC_STDC_INLINE__) /* e.g. GCC 5.x defaults to this, not __GNUC_GNU_INLINE__ */ extern #endif +t1 e (t2, t2, int, t1); +void g(); +void h(); __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) {t1 c,x,r;int i;if(v0){c=1;for(i=1;i +void lshift_com (unsigned long *, unsigned long *, long, unsigned); void lshift_com (rp, up, n, cnt) unsigned long *rp; @@ -815,6 +829,7 @@ [AC_MSG_CHECKING([compiler $1 has long long]) cat >conftest.c <&AC_FD_CC cat >conftest.c <<\EOF [int foo; +int bar (); int bar () { return foo; } ]EOF tmp_got_emitted=no @@ -1150,7 +1166,7 @@ [AC_MSG_CHECKING([assembler $1 $2]) result=no cat >conftest.c <conftest.c <conftest.c <&AC_FD_CC @@ -3294,6 +3313,7 @@ AC_TRY_RUN([ #include /* for strcmp */ #include /* for vsnprintf */ +#include /* for exit */ #if HAVE_STDARG #include @@ -3399,7 +3419,7 @@ yes) tmp_inline=inline ;; *) tmp_inline=$ac_cv_c_inline ;; esac - AC_MSG_WARN([mpir.h doesnt recognise compiler "$tmp_inline", inlines will be unavailable])]) + AC_MSG_WARN([mpir.h doesn't recognise compiler "$tmp_inline", inlines will be unavailable])]) ;; esac ]) @@ -3576,7 +3596,7 @@ gmp_cv_c_for_build_ansi, [cat >conftest.c <