From 96824aa5d000c9060a18e9c1958aea6626cfc423 Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Mon, 13 Oct 2014 21:35:14 +0200 Subject: (freebsd hacked gcc): Test for crash-prone FreeBSD gcc. --- acinclude.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index a1997f110..e9a28e47c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -634,6 +634,20 @@ int dummy; #endif ]) +GMP_PROG_CC_WORKS_PART([$1], [freebsd hacked gcc], +[/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under + -O2 -march=amdfam10. We call helper functions here "open" and "close" in + order for linking to succeed. */ + +#if defined (__GNUC__) && ! defined (__cplusplus) +int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ +__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl +(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} +#else +int dummy; +#endif +]) + GMP_PROG_CC_WORKS_PART_MAIN([$1], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] -- cgit v1.2.1