Gcc 4.3 crashes on the 38 megabyte file generated with:
#!/usr/bin/perl -w
print <<EOF;
struct a {
int i;
char c;
};
EOF
for ($i = 1; $i < 1000000; $i++) {
printf "struct a a_%d = {\n", $i;
printf " .i = $i,\n";
printf "};\n\n";
}
The test was run as
./gcc-test.pl > test.c
gcc-4.3 -c test.c
Gcc-4.2 was able to handle a file 4 time bigger (4M entries),
eating only about 2 gigabytes or RAM. I was not able to confirm
that it could survive 6M, because ot the limited ram and
trashing swap. Was comfirmed to work wint at least 10M by others.
The tests were run on Debian-patched gcc, but were confirmed with
vanilla gcc by others.
--
Summary: Gcc fails on huge C source files.
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: alexey dot zaytsev at gmail dot com
GCC build triplet: i486-pc-linux-gnu
GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36516