When compiling the attached testcase, current trunk gcc uses all available
memory on my system (4GB) and then swaps until I interrupt the process. This
only happens with -O3; using -O2 works as expected.
gcc 4.5 comiles the file as expected with -O3.

/scratch/tmp/devel2/build.linux_gcc/libcfitsio>gcc -c -O3 -v checksum.i
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/afs/mpa/data/martin/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /scratch/martin/gcc/configure --disable-bootstrap
--enable-gold --enable-plugins --prefix=/afs/mpa/data/martin/ugcc
--with-ppl=/afs/mpa/data/martin/numlibs64
--with-cloog=/afs/mpa/data/martin/numlibs64
--with-libelf=/afs/mpa/data/martin/numlibs64 --enable-languages=c++,fortran
--enable-target=all --enable-checking=release
Thread model: posix
gcc version 4.6.0 20100609 (experimental) [trunk revision 160476] (GCC) 
COLLECT_GCC_OPTIONS='-c' '-O3' '-v' '-mtune=generic' '-march=x86-64'
 /afs/mpa/data/martin/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1
-fpreprocessed checksum.i -quiet -dumpbase checksum.i -mtune=generic
-march=x86-64 -auxbase checksum -O3 -version -o /tmp/ccibJbLw.s
GNU C (GCC) version 4.6.0 20100609 (experimental) [trunk revision 160476]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.6.0 20100609 (experimental) [trunk revision 160476]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f4e23293da4cc17049a858a32373cf07
^C
/scratch/tmp/devel2/build.linux_gcc/libcfitsio>


-- 
           Summary: [4.6 regression] gcc consumes all available memory when
                    optimizing
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to