This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can gcc 4.3.1 handle big function definitions?
- From: Andrew Haley <aph at redhat dot com>
- To: Klaus Grue <grue at diku dot dk>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 08 Sep 2008 10:02:24 +0100
- Subject: Re: Can gcc 4.3.1 handle big function definitions?
- References: <Pine.LNX.4.64.0809080943480.24585@tyr.diku.dk>
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.