summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTorbjorn Granlund <torbjorng@google.com>2014-10-13 21:35:14 +0200
committerTorbjorn Granlund <torbjorng@google.com>2014-10-13 21:35:14 +0200
commit96824aa5d000c9060a18e9c1958aea6626cfc423 (patch)
treefd4cbcdefbcc2e986438765963e7d7209fed12b3 /acinclude.m4
parent910225167cac751ba35362c24d6b5d9752d03779 (diff)
downloadgmp-96824aa5d000c9060a18e9c1958aea6626cfc423.tar.gz
(freebsd hacked gcc): Test for crash-prone FreeBSD gcc.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m414
1 files changed, 14 insertions, 0 deletions
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]