Can gcc 4.3.1 handle big function definitions?

Klaus Grue
Mon Sep 8 08:06:00 GMT 2008

Hi All,

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 

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.



grue@pc189-kgr:~> gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --with-local-prefix=/usr/local 
--infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 
--enable-ssp --disable-libssp --with-bugurl= 
--with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 
--with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new 
--disable-libstdcxx-pch --program-suffix=-4.3 
--enable-version-specific-runtime-libs --enable-linux-futex 
--without-system-libunwind --with-cpu=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] 
(SUSE Linux)

More information about the Gcc mailing list