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

            Bug ID: 59811
           Summary: Huge increase in memory usage and compile time with
                    gfortran 4.8
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bastian.feigl at kit dot edu

Created attachment 31833
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31833&action=edit
Example fortran source code file with problems with gfortran 4.8

When switching from gfortran 4.7 to gfortran 4.8 the memory usage and compile
time vastly increases for some files in our project, e.g. for the attached
example file. gfortran 4.8.2 needs 50s to compile, using up to 1.7 GB of RAM,
while gfortran 4.7 compiles it in 7s with a memory usage of 136 MB.

The command line of the gfortran-call for the attached example is
/opt/gcc/4.8.2/bin/gfortran -fno-automatic -ffixed-line-length-none -O2 -c
FermionBoxEventempCoupling_Div.F -o output.o 

The problem seems to be partly linked to the option -fno-automatic, since
omitting it inhibits the memory increase, but the compile time is still 14s
with gfortran 4.8, compared to 6s with gfortran 4.7.

The problem arises with optimizations -O2 and -O1 lead to a similar
discrepancy, with -O0 the problem does not exist.

The gfortran 4.8 which shows the problematic behaviour is built with:
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.2/configure --prefix=/opt/gcc/4.8.2
--enable-languages=c,c++,fortran
gcc version 4.8.2 (GCC) 

The gfortran 4.7 is the built-in from openSUSE 12.2:
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --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.7
--enable-ssp --disable-libssp --disable-libitm --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--program-suffix=-4.7 --enable-linux-futex --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
gcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux)

Reply via email to