https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80555

            Bug ID: 80555
           Summary: gfortran crashes with segmentation fault
           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 41282
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41282&action=edit
Run gfortran -c on this.

gfortran crashes with segmentation fault when compiling the attached file.
Problem is related to using MAXVAL of a rank-2 PARAMETER array as dimension for
a static variable.No special flags required, just gfortran -c. No assembly
generated. Running on Debian Jessie, tested with Debian's gcc 5.3.0 and 6.2.0
plus locally compiled 5.4.0. Compiler output from 6.2.0 is terse, from 5.4.0 is
pasted below:f951: internal compiler error: Segmentation fault
0xa8d25f crash_signal
        ../../gcc/toplev.c:383
0x6e9d72 gfc_add_decl_to_parent_function
        ../../gcc/fortran/trans-decl.c:239
0x6e9d72 create_index_var
        ../../gcc/fortran/trans-decl.c:802
0x6ebffa gfc_build_qualified_array
        ../../gcc/fortran/trans-decl.c:889
0x6eec34 gfc_get_symbol_decl(gfc_symbol*)
        ../../gcc/fortran/trans-decl.c:1549
0x6f0f3b gfc_create_module_variable
        ../../gcc/fortran/trans-decl.c:4592
0x6bd42b do_traverse_symtree
        ../../gcc/fortran/symbol.c:3646
0x6f0c4b gfc_generate_module_vars(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:5035
0x6d4bd1 gfc_generate_module_code(gfc_namespace*)
        ../../gcc/fortran/trans.c:2061
0x68f14d translate_all_program_units
        ../../gcc/fortran/parse.c:5393
0x68f14d gfc_parse_file()
        ../../gcc/fortran/parse.c:5603
0x6ce915 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:229

Reply via email to