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

            Bug ID: 95880
           Summary: [9/10/11 Regression] ICE in gfc_add_type, at
                    fortran/symbol.c:2030
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to r8, started between 20200517 and 20200524 :


$ cat z1.f90
module m
end
block data
   use m
   integer m
end block data


$ cat z5.f90
module m
   type t
   end type
end
block data
   use m
   type(t) m
end block data


$ gfortran-11-20200517 -c z1.f90
z1.f90:5:12:

    5 |    integer m
      |            1
Error: Symbol 'm' at (1) cannot have a type


$ gfortran-11-20200621 -c z1.f90
f951: internal compiler error: Segmentation fault
0xbce57f crash_signal
        ../../gcc/toplev.c:328
0x6f02bc gfc_add_type(gfc_symbol*, gfc_typespec*, locus*)
        ../../gcc/fortran/symbol.c:2030
0x63eeed build_sym
        ../../gcc/fortran/decl.c:1685
0x649969 variable_decl
        ../../gcc/fortran/decl.c:2793
0x649969 gfc_match_data_decl()
        ../../gcc/fortran/decl.c:6195
0x6ad323 match_word
        ../../gcc/fortran/parse.c:65
0x6ad323 decode_statement
        ../../gcc/fortran/parse.c:376
0x6aed6a next_free
        ../../gcc/fortran/parse.c:1280
0x6aed6a next_statement
        ../../gcc/fortran/parse.c:1512
0x6b03bb parse_spec
        ../../gcc/fortran/parse.c:3923
0x6b4e30 parse_block_data
        ../../gcc/fortran/parse.c:6026
0x6b4e30 gfc_parse_file()
        ../../gcc/fortran/parse.c:6413
0x70098f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

Reply via email to