[Bug c/30610] New: huge memory consumption with -O3

kcwu at csie dot org gcc-bugzilla@gcc.gnu.org
Sat Jan 27 16:25:00 GMT 2007


Happen with gcc43 snapshot 20070105 (experimental).
gcc configured with: ./..//gcc-4.3-20070105/configure --disable-nls
--with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local
--program-suffix=43 --libdir=/usr/local/lib/gcc-4.3.0
--with-gxx-include-dir=/usr/local/lib/gcc-4.3.0/include/c++/
--infodir=/usr/local/info/gcc43 --disable-libgcj --prefix=/usr/local
x86_64-portbld-freebsd6.2

$ time gcc43 -O3 -c f5.c -Wall
user    8m0.834s
max memory usage 1321 MB.

It takes too long time and huge memory to compile, compared to gcc4.2 or -O2:
$ time gcc42 -O3 -c f5.c
user    0m0.575s
$ time gcc43 -O2 -c f5.c -finline-functions -funswitch-loops
-fgcse-after-reload                 
user    0m0.602s
And the memory usage is less than 10 MB.


-- 
           Summary: huge memory consumption with -O3
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kcwu at csie dot org
 GCC build triplet: x86_64-portbld-freebsd6.2
  GCC host triplet: x86_64-portbld-freebsd6.2
GCC target triplet: x86_64-portbld-freebsd6.2


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



More information about the Gcc-bugs mailing list