http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51742
--- Comment #3 from Steven Schweda <sms at antinode dot info> 2012-01-05 05:23:43 UTC --- > This is the first time the stage1 compiler is used which means it doesn't work > at all. [...] Not as I understand "the first time". The end of the log looks like this: [...] /usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/xgcc -B/usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/ -B/usr/local/hppa2.0w-hp-hpux11.11/bin/ -B/usr/local/hppa2.0w-hp-hpux11.11/lib/ -isystem /usr/local/hppa2.0w-hp-hpux11.11/include -isystem /usr/local/hppa2.0w-hp-hpux11.11/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -frandom-seed=fixed-seed -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I../../../gcc-4.6.2/libgcc -I../../../gcc-4.6.2/libgcc/. -I../../../gcc-4.6.2/libgcc/../gcc -I../../../gcc-4.6.2/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o _fixxfdi.o -MT _fixxfdi.o -MD -MP -MF _fixxfdi.dep -DL_fixxfdi -c ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c \ /usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/xgcc -B/usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/ -B/usr/local/hppa2.0w-hp-hpux11.11/bin/ -B/usr/local/hppa2.0w-hp-hpux11.11/lib/ -isystem /usr/local/hppa2.0w-hp-hpux11.11/include -isystem /usr/local/hppa2.0w-hp-hpux11.11/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -frandom-seed=fixed-seed -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I../../../gcc-4.6.2/libgcc -I../../../gcc-4.6.2/libgcc/. -I../../../gcc-4.6.2/libgcc/../gcc -I../../../gcc-4.6.2/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o _fixtfdi.o -MT _fixtfdi.o -MD -MP -MF _fixtfdi.dep -DL_fixtfdi -c ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c \ /usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/xgcc -B/usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/ -B/usr/local/hppa2.0w-hp-hpux11.11/bin/ -B/usr/local/hppa2.0w-hp-hpux11.11/lib/ -isystem /usr/local/hppa2.0w-hp-hpux11.11/include -isystem /usr/local/hppa2.0w-hp-hpux11.11/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -frandom-seed=fixed-seed -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I../../../gcc-4.6.2/libgcc -I../../../gcc-4.6.2/libgcc/. -I../../../gcc-4.6.2/libgcc/../gcc -I../../../gcc-4.6.2/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o _fixunssfdi.o -MT _fixunssfdi.o -MD -MP -MF _fixunssfdi.dep -DL_fixunssfdi -c ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c \ ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c: In function '__fixunssfdi': ../../../gcc-4.6.2/libgcc/../gcc/libgcc2.c:1292:3: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. [...] In fact: dy # grep ^/usr/local/gnu/gcc/gcc-4.6.2_obj/./gcc/xgcc \ > gcc-4.6.2_gmake_2.out | wc -l 57 So it seems not to have failed more than a few times before failing. > Please use gdb to debug it and see why it segfaults. I'll try to install gdb, and poke around a little, but don't expect too much. The back story on this is that I've been adding PPMd compression capability to the Info-ZIP UnZip program, and I was getting bad behavior on my AIX/PowerPC and HP-UX/PA-RISC systems, while the same (public domain, probably widely used) code was working as expected on some other systems (HP-UX/IA64 (GCC), Solaris/SPARC (some old GCC and Sun C), VMS/Alpha (HP C), VMS/IA64 (HP C), VMS/VAX (Compaq C)). After too much fooling around, I discovered that compiling one particular module with -O1 (HP-UX) or -O2 (AIX) instead of -O3 (our GCC default) would correct the bad behavior. A strategic fprintf( stderr, ... bad_variable) in the misbehaving function also corrects the bad behavior. I was trying to bring the compilers up to date, to see if I'd get lucky, and find that there was a compiler optimization problem which had been fixed already. But I can't get a recent GCC build to go through on either the AIX or HP-UX systems. Chasing GCC build problems is approximately twice removed from my actual problem, and I had hoped that someone who knows more about GCC than I would be interested enough to see if this build problem can be reproduced, at least, or if there's something especially lame about my environment(s). Sadly, creating a small test program which exhibits the optimization problem does not look easy, either. (But I could supply an UnZip source kit (12MB), an example PPMd-using archive (7MB), and instructions, if anyone with the appropriate hardware were interested.)