The same code builds without the -O flag but gcc 'crashes' when adding optimization... I wasn't sure if I had to include the binary Config.ii.bz2 in this mail... I'm using gccbug so it seems a bit odd to include binary data here. Instead I uploaded it, you can download it here: http://aphexer.dyndns.org/bug/Config.ii.bz2 (in the same directory there are some other maybe interesting files). Environment: System: Linux slack 2.4.26 #21 Mon Jun 14 19:17:44 PDT 2004 i686 unknown unknown GNU/Linux Architecture: i686 host: i486-slackware-linux-gnu build: i486-slackware-linux-gnu target: i486-slackware-linux-gnu configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux How-To-Repeat: I use this to compile: g++ -Wall -save-temps -DHAVE_CONFIG_H -I. -I. -I../.. -g -O -MT Config.o -MD -MP -MF ".deps/Config.Tpo" -c -o Config.o Config.cpp
Fix: Remove the -O argument.
Created attachment 7490 [details] this generates the error.... Didn't know I could attach this here... So now I did :) You can download related code at http://aphexer.dyndns.org/bug/ (in case you want to see what I actually wrote, this preprocessed thing seems a bit cryptic to me :))
Can this be caused by insufficient memory? This machine only has 32MB of ram...
Yes most likley. What is the error message?
Now it's on that next file but it's the same error: if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -g -O2 -MT HFormat.o -MD -MP -MF ".deps/HFormat.Tpo" -c -o HFormat.o HFormat.cpp; \ then mv -f ".deps/HFormat.Tpo" ".deps/HFormat.Po"; else rm -f ".deps/HFormat.Tpo"; exit 1; fi g++: Internal error: Killed (program cc1plus) Please submit a full bug report. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make: *** [HFormat.o] Error 1
Yes this is a case where 32M is just too little for compiling C++ code in 3.3, you might want to try 3.4.
Isn't this error a bit misleading? Something like "Not enouph memory, aborting..." seems alot more clear! Maybe this is something which can be changed for a next release? Well my problem is actually solved... just add more ram :) Maybe it's a good idea too put another note on the checklist before reporting a bug: "do you have enouph ram? (check with 'free' while compiling)". Thanks for helping.
g++: Internal error: Killed (program cc1plus) The kernel is killing cc1plus for hitting memory limits and not gcc crashing.
Not a GCC bug.