From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Description of problem: Compilation of cvcl 1.1.0 fails with this error: g++ -O2 -Wall -I/tmp/cvcl-1.1.0/src/include -I/tmp/cvcl-1.1.0 -I. -c -D__DEPRECATED -DHAVE___GNU_CXX__EXT_HASH_MAP -DHAVE___GNU_CXX__EXT_HASH_SET -DHAVE_CONFIG_H parsePL.cpp -o /tmp/cvcl-1.1.0/obj/parser/linux-i686/parsePL.o cc1plus: out of memory allocating 3906815220 bytes after a total of 18948096 bytes Compiling with -O2 -fno-default-inline succeeds. The file in question is generated by bison. Version-Release number of selected component (if applicable): gcc-3.3.3-7 How reproducible: Always Steps to Reproduce: 1. Download and unpack cvcl-1.1.0.tar.gz 2. In the cvcl-1.1.0 directory, run ./configure 3. make Actual Results: When compilation reaches the file in question, it attempts to allocate more memory than is available and fails. Expected Results: GCC should not fail, although what it could do in this situation depends on why it is trying to allocate so much memory. Additional info: To compile with -fno-default-inline, do: make OPTFLAGS='-O2 -fno-default-inline'
Please provide a preprocessed source which triggers this. (run the above command with additional -save-temps option and attach here parsePL.ii it creates.
Created attachment 102299 [details] Preprocessed parsePL.cpp (bzip2ed) I had to compress it because bugzilla complained the attachment was too large.
Exception handling in this testcase increases number of basic blocks from around 34000 to 176000. Some algorithms in GCC are Ospace(nBB^2), thus your testcase is too big. What you can do is tweak the inline limits (see man gcc on --param) so that less inlining happens. GCC 3.4 has better inlining algorithm, but it is too invasive change for GCC 3.3. FC3t1 uses GCC 3.4.x, so you might try your fortune there.