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

            Bug ID: 95614
           Summary: ICE in build_field, at fortran/trans-common.c:301
           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: ---

A name clash affects versions down to at least r5 :


$ cat z1.f90
module m
common m
end


$ cat z2.f90
module m
common /xc/ m
end


$ cat z0.f90
module m
integer m
end


$ gfortran-11-20200607 -c z0.f90
z0.f90:2:9:

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


$ gfortran-11-20200607 -c z1.f90
f951: internal compiler error: Segmentation fault
0xd5a35f crash_signal
        ../../gcc/toplev.c:328
0x9c8ecb contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3409
0x9c8ecb size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*)
        ../../gcc/fold-const.c:1906
0x763a2a build_field
        ../../gcc/fortran/trans-common.c:301
0x763a2a create_common
        ../../gcc/fortran/trans-common.c:646
0x765cce translate_common
        ../../gcc/fortran/trans-common.c:1265
0x765e86 gfc_trans_common(gfc_namespace*)
        ../../gcc/fortran/trans-common.c:1356
0x778c27 gfc_generate_module_vars(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:5796
0x746891 gfc_generate_module_code(gfc_namespace*)
        ../../gcc/fortran/trans.c:2238
0x6f1141 translate_all_program_units
        ../../gcc/fortran/parse.c:6293
0x6f1141 gfc_parse_file()
        ../../gcc/fortran/parse.c:6545
0x73daef gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

Reply via email to