For my generated C file that has 24MB, gcc fails after 11 seconds with: gcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. Fedora 11 64-bit, Pentium Quad Core, 2.83GHz, 4GB memory, gcc 4.4.1 $ uname -a Linux 2.6.30.9-99.fc11.x86_64 #1 SMP Tue Nov 17 21:30:38 EST 2009 x86_64 x86_64 x86_64 GNU/Linux Source file and valgrind report are added as attachment.
Created attachment 20263 [details] testing C file
Created attachment 20264 [details] valgrind report
Other details, e.g. why I want to compile so huge file, can be found here: http://n3.nabble.com/Memory-and-time-consumption-for-larger-files-td683717.html#a683717
needs -DCLANG to build. cgraph verification takes ages, so make sure to turn off checking. The issue is: Program received signal SIGSEGV, Segmentation fault. 0x00000000007b9f6e in cgraph_output_in_order () at /space/rguenther/src/svn/gcc-4_4-branch/gcc/cgraphunit.c:1148 1148 memset (nodes, 0, size); (gdb) p size $1 = 13406704 (gdb) l 1143 struct cgraph_asm_node *pa; 1144 1145 max = cgraph_order; 1146 size = max * sizeof (struct cgraph_order_sort); 1147 nodes = (struct cgraph_order_sort *) alloca (size); 1148 memset (nodes, 0, size); 1149 1150 varpool_analyze_pending_decls (); 1151 1152 for (pf = cgraph_nodes; pf; pf = pf->next) well. We shouldn't try to allocate so much memory on stack. Mine.
Subject: Bug 43600 Author: rguenth Date: Wed Mar 31 13:20:19 2010 New Revision: 157867 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157867 Log: 2010-03-31 Richard Guenther <rguenther@suse.de> PR middle-end/43600 * cgraphunit.c (cgraph_output_in_order): Do not allocate temporary data on stack. Modified: trunk/gcc/ChangeLog trunk/gcc/cgraphunit.c
Subject: Bug 43600 Author: rguenth Date: Wed Mar 31 13:23:17 2010 New Revision: 157868 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157868 Log: 2010-03-31 Richard Guenther <rguenther@suse.de> PR middle-end/43600 * cgraphunit.c (cgraph_output_in_order): Do not allocate temporary data on stack. Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/cgraphunit.c
Fixed.