This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: Subtle bug with GCC optimization?
> From: Marius Vollmer <mvo@zagadka.ping.de>
> Date: 17 Aug 2000 01:13:35 +0200
>
> Ah, yes, I remember. I have now fixed my problem by inserting this
>
> #ifdef __GNUC__
> /* GCC 2.95.2 has a bug in its optimizer that makes it generate
> incorrect code sometimes. This barrier stops it from being too
> clever. */
> asm volatile ("" : "=g" (winds));
> #endif
>
> at a strategic place in scm_ithrow. I don't need to turn off gcse and
> the rest of Guile is unaffected. The code for scm_ithrow seems to be
> just as optimal, but I don't really care.
Well, I've added the test to the configure script, but haven't applied
the -fno-gcse fix. Maybe you could commit something like this:?
#ifdef BROKEN_GCSE
#ifdef __GNUC__
/* GCC 2.95.2 has a bug in its optimizer that makes it generate
incorrect code sometimes. This barrier stops it from being too
clever. */
asm volatile ("" : "=g" (winds));
#else
#error "GCSE bug found: reconfigure without optimization?"
#endif
#endif