https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80610
Bug ID: 80610
Summary: Compiler crashes ungraciously when large static array
is initialized with anything other than zero
Product: gcc
Version: 6.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gustavo.hime at mpimet dot mpg.de
Target Milestone: ---
Created attachment 41304
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41304&action=edit
bug_static_array.f90
Please compile the code snippet with "gfortran -c -finit-real=nan
bug_static_array.f90" or any other value for -finit-real different from zero.
Local installations of version 5.2.0, 5.4.0 and 6.2.0 hang a while and then
crash with the message:
virtual memory exhausted: Cannot allocate memory
The code there is just to prevent things from being optimized out. The bug is
related to the size of the array. The code may be unrealistic, but I was victim
of a typo. Took me a while to pin down the source.