gcc 2.95 optimizer bug?

Joe Ramey ramey@csc.ti.com
Tue Aug 31 22:45:00 GMT 1999


   cc: gcc-bugs@gcc.gnu.org
   Date: Sun, 01 Aug 1999 11:44:22 -0500
   From: Mumit Khan <khan@xraylith.wisc.EDU>

   Thanks. I can reproduce it on a sparc-sun-solaris2.5.1, but not on
   a i686-pc-linux-gnu. Perhaps a platform specific bug? I'll take a
   look at the assembly later to see if I can spot anything.

Thank you.  I looked at it a little but I'm afraid it'll be a while
before I come up to speed on sparc assembly code.

   The only workaround I see is to use -fno-gcse.

I experimented with various optimization options a bit too.  I found
that this set of options seems to cause the problem:

gcc -O -frerun-cse-after-loop -fgcse -fexpensive-optimizations -fschedule-insns -fschedule-insns2 -o trybug trybug.c

if I take out any of the -f options in the above command the bus error
goes away, except if I take out -fschedule-insns2 then I get a
segmentation fault instead of a bus error.  Don't know if this is
useful to know or not.  I was hoping to find just one option which
might be causing the problem (like you did with -fno-gcse).

Joe



More information about the Gcc-bugs mailing list