Bug 34983 - i486-linux-gnu-g++: Internal error: Killed (program cc1plus)
Summary: i486-linux-gnu-g++: Internal error: Killed (program cc1plus)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog, memory-hog
Depends on:
Blocks: 47344
  Show dependency treegraph
 
Reported: 2008-01-26 17:40 UTC by Mario Bonino
Modified: 2024-02-21 06:54 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.6.0
Last reconfirmed: 2008-11-11 20:37:01


Attachments
execute.cpp preprocessed source (115.32 KB, application/octet-stream)
2008-11-11 17:36 UTC, Luca Bonissi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Bonino 2008-01-26 17:40:51 UTC
That error was produced while building pixie 2.2.1-1ubuntu1 on the Ubuntu build machine iridium (https://launchpad.net/+builds/iridium). Here you can find the complete build log. 
http://launchpadlibrarian.net/11439976/buildlog_ubuntu-hardy-i386.pixie_2.2.1-1ubuntu1_FAILEDTOBUILD.txt.gz
Comment 1 Richard Biener 2008-01-26 18:40:12 UTC
We need a preprocessed testcase and information on how you invoked gcc.  Also
try a newer version than 4.2.0.
Comment 2 Andrew Pinski 2008-01-26 18:57:42 UTC
Oh and how much memory you have too?
Comment 3 Mario Bonino 2008-01-27 10:09:10 UTC
That error was received on a Ubuntu build machine so I don't have information about memory. However, I tried to build the package on my computer and I received the same error. I have 2GB RAM and gcc-4.2.2-7ubuntu1 installed. To get this I simply run make from the sources directory.  

Comment 4 Richard Biener 2008-01-27 12:22:08 UTC
We still need preprocessed souce (you get that from passing -save-temps) of the
affected file.
Comment 5 Mario Bonino 2008-01-27 12:56:17 UTC
I don't know if this is ok but I've got this.
http://pastebin.ubuntu.com/3935/
Comment 6 Luca Bonissi 2008-11-11 17:36:11 UTC
Created attachment 16655 [details]
execute.cpp preprocessed source

Compiling Pixie (version 2.2.4, with gcc 4.2.3), in particular execute.cpp, requires 1.5 GB of available memory (better if real, otherwise it could take some hours). Is it normal a so big amount of required memory?
Comment 7 Richard Biener 2008-11-11 20:37:01 UTC
4.3 uses ~1GB of ram.

 tree SSA incremental  :  11.10 (10%) usr   0.09 ( 4%) sys  11.70 (10%) wall   13667 kB ( 3%) ggc
 dominance frontiers   :  10.27 ( 9%) usr   0.07 ( 3%) sys  10.24 ( 9%) wall       0 kB ( 0%) ggc
 loop analysis         :  16.90 (15%) usr   0.03 ( 1%) sys  17.17 (15%) wall     988 kB ( 0%) ggc

it's yet another case of a massive function with loops.
Comment 8 Paolo Carlini 2011-11-06 23:23:16 UTC
Should we keep this open?
Comment 9 Richard Biener 2011-11-07 09:13:10 UTC
4.6 requires 2GB at -O2, so yes.  But, linking from 47344 to here instead.

*** This bug has been marked as a duplicate of bug 47344 ***
Comment 10 Richard Biener 2011-11-07 09:14:08 UTC
Didn't meant to mark it as dup.
Comment 11 Richard Biener 2024-02-20 12:30:17 UTC
GCC 14 requires just 600MB ram at -O2 now and the testcase requires -fpermissive.  GCC 12 required a tiny bit less.

Turning to the "worst" case using -m32 -g -fPIC I get up to 780MB,
ontop of -O3 vs -O2 it becomes 815MB.

The very worst case has a flat profile besides

 tree FRE                           :   5.52 ( 20%)

let's close this as fixed also given the bad state of the testcase, there's
nothing specific for it anymore and memory usage is better than in GCC 4.3.