[Bug fortran/91646] New: gfortran takes long time and consumes a lot of memory
luomo1138 at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 3 15:28:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91646
Bug ID: 91646
Summary: gfortran takes long time and consumes a lot of memory
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: luomo1138 at yahoo dot com
Target Milestone: ---
Created attachment 46806
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46806&action=edit
source file demonstrating issue
Hello,
I have an issue with gfortran taking a very long time and consuming a lot of
memory to compile a file.
The attached file compiles in about one second when using either gfortran 4.9.2
or the Intel Fortran compiler (ifort). However, when I use gfortran 9.1.0,
that file takes a very long time to compile.
When I compile the file with this command:
```
gfortran -Wall -c -pass-exit-codes -ffree-line-length-0 -g LVT_statsDataMod.F90
```
it takes 10 minutes to compile and uses approximately 20GB of memory.
Similarly for "-O0". When I use either "-O1" or "-O2", it takes over an hour
to compile and uses at least 35GB of memory. (I do not know exactly how long
because I killed it after one hour.)
I have seen similar behaviour with gfortran 7.3 and 8.1 as well.
I also compiled with "-Wextra" and "-fno-strict-aliasing -fwrapv
-fno-aggressive-loop-optimizations", but nothing was reported.
Do you have any suggestions?
* Exact version, system type, and GCC build options:
```
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/gpfsm/dulocal/sles11/other/SLES11.3/gcc/9.1/libexec/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /gpfsm/dnbsrc/other/GCC/SLES11/9.1/gcc-9.1.0/configure
--prefix=/gpfsm/dulocal/sles11/other/SLES11.3/gcc/9.1 --enable-languages=all
--enable-bootstrap
Thread model: posix
gcc version 9.1.0 (GCC)
```
* complete command line:
```
gfortran -Wall -c -pass-exit-codes -ffree-line-length-0 -g LVT_statsDataMod.F90
```
* compiler output:
None
* preprocessed file:
Attached file does not require any preprocessing.
Here is the version of gfortran that performs as I expect:
```
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/gpfsm/dulocal/sles11/other/SLES11.3/gcc/4.9.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /gpfsm/dnbsrc/other/GCC/SLES11/4.9.2/gcc-4.9.2/configure
--prefix=/usr/local/other/SLES11.3/gcc/4.9.2 --enable-languages=all
--enable-bootstrap
Thread model: posix
gcc version 4.9.2 (GCC)
```
Thanks,
Jim
More information about the Gcc-bugs
mailing list