[egcs 1.0.1] Irix 6: -g and -O3 interaction

Jeremiah W. James jerry@cs.ucsb.edu
Thu Jan 15 16:30:00 GMT 1998


I know that using the -g and -O3 flags together is not the greatest idea
in the world.  However, I have this compulsion to push new compilers and
see if they will break.  I tried compiling binutils 2.8.1 with egcs
1.0.1 on a mips-sgi-irix6.2 platform, and added an optimization flag of
-O3, just for fun.  I did not remove the -g flag already in the
makefiles.

It worked fine, with the exception of one file, bfd/tekhex.c.  When
compiling that file with this command:

  gcc -c -D_GNU_SOURCE -DIRIX_CORE -I. -I../include -g -O3 tekhex.c

the compiler halted with the following message:

  gcc: Internal compiler error: program cc1 got fatal signal 6

Removing the -g from the compile line fixed the problem.  Leaving the -g
there and changing the -O3 to -O2 also fixed the problem.  Explicitly
setting the abi (-mabi=n32 and -mabi=64) didn't help.  Unfortunately, I
don't have the know-how to track down the specific source of the fatal
signal, or I'd be happy to do it for you.

Regards,
-- 
Jerry James
Email: jerry@cs.ucsb.edu
WWW:   http://www.cs.ucsb.edu/~jerry/



More information about the Gcc mailing list