Can gcc 4.3.1 handle big function definitions?

Andrew Haley aph@redhat.com
Mon Sep 8 09:03:00 GMT 2008


Klaus Grue wrote:

> Is this a known problem:
> 
> After upgrading to gcc 4.3.1, I can no longer compile a function whose
> source code is 0.7 Megabyte before preprocessing and 3.5 Megabyte after
> preprocessing.
> 
> The function (named "testsuite") is just a long list of statements
> essentially of form if(!condition){complain();exit();}
> 
> The behaviour is: CPU time goes to 100%, then RAM size grows to
> 1 Gigabyte, then swap space starts growing and CPU time goes to 10%.
> 
> On my previous gcc (4.2.something, I think), compilation went fine.

Isn't this simply that you need more RAM?  Sure, as gcc grows and we
add more optimizations, you need more memory, but there's no
explicit limitation.  Is this with -O0?  If so, I think that's a
bug.

Andrew.



More information about the Gcc mailing list