From aec1eb30482afb97764e3abda8dd7d7749d4f597 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Fri, 18 Aug 2000 22:44:12 +0000 Subject: [PATCH] * acconfig.h: added BROKEN_GCSE. * configure.in: check for a gcc GCSE optimisation bug. --- acconfig.h | 3 +++ configure.in | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/acconfig.h b/acconfig.h index b7b42bc3d..cf5e0fff2 100644 --- a/acconfig.h +++ b/acconfig.h @@ -154,3 +154,6 @@ /* Define if the compiler supports long longs. */ #undef HAVE_LONG_LONGS + +/* Define if GCC has GCSE optimisation bug. */ +#undef BROKEN_GCSE diff --git a/configure.in b/configure.in index 09e897dee..3c4126e90 100644 --- a/configure.in +++ b/configure.in @@ -129,6 +129,33 @@ if test "$scm_cv_long_longs" = yes; then AC_DEFINE(HAVE_LONG_LONGS) fi +dnl check for an optimisation problem which is present in some versions +dnl of gcc, including 2.95.2. +AC_MSG_CHECKING(for broken GCSE optimisation) +AC_CACHE_VAL(guile_cv_broken_gcse, + AC_TRY_RUN([ + int main () + { + long winds = 0; + + while (winds != 0) + { + if (*(char *) 0) + break; + } + + if (winds == 0 || *(char *) 0) + exit (0); + + return 0; + }], + guile_cv_broken_gcse=no, guile_cv_broken_gcse=yes, + guile_cv_broken_gcse=yes)) +AC_MSG_RESULT($guile_cv_broken_gcse) +if test $guile_cv_broken_gcse = yes; then + AC_DEFINE(BROKEN_GCSE) +fi + AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME