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.

The problematic source can be found at http://logiweb.eu/grue/lgwam.c

The source only #includes standard headers.

The source is compiled thus:

gcc -ldl -o lgwam lgwam.c

To double check that optimization is off, I tried with -O0
which gave the same result as not using -O0.

I failed to find out how to fill in Host, Target, and Build
triplet. Sorry. Here comes the output from gcc -v:

---

[EMAIL PROTECTED]:~> 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
--libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3
--enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
--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)

---

Bradley Lucier (lucier aat math doot purdue doot edu) suggested
that this could resemble
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26854

He wrote thus at the gcc mailing list:

---

I compiled your file with a recent version of the current development
compiler

euler-27% /pkgs/gcc-mainline/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../../mainline/configure --enable-checking=release --
with-gmp=/pkgs/gmp-4.2.2/ --with-mpfr=/pkgs/gmp-4.2.2/ --prefix=/pkgs/
gcc-mainline --enable-languages=c --enable-gather-detailed-mem-stats
Thread model: posix
gcc version 4.4.0 20080827 (experimental) [trunk revision 139624] (GCC)

with

 /pkgs/gcc-mainline/bin/gcc -c lgwam.c -fmem-report -ftime-report

and got the following statistics.  If you file a bug report, then they may
prove helpful.

---

I have placed the mentioned statistics at
http://logiweb.eu/grue/lgwam.c.stats-O0


-- 
           Summary: gcc 4.3.1 cannot compile big function
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: grue at diku dot dk
 GCC build triplet: See section on gcc -v in Description
  GCC host triplet: See section on gcc -v in Description
GCC target triplet: See section on gcc -v in Description


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37448

Reply via email to