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

            Bug ID: 78043
           Summary: ICE in force_decl_die, at dwarf2out.c:23533
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

With valid code and option -g, ICEs down to at least 4.8 :


$ cat z1.f90
module m
   common /xc/ a
end
module m2
   use m
end
program p
   use m2, only: z => a
   z = 1.0
end


$ gfortran-7-20161016 -c z1.f90
$
$ gfortran-7-20161016 -g -c z1.f90
z1.f90:8:0:

    use m2, only: z => a

internal compiler error: in force_decl_die, at dwarf2out.c:23533
0x8bb39f force_decl_die
        ../../gcc/dwarf2out.c:23533
0x8ce6ef dwarf2out_imported_module_or_decl_1
        ../../gcc/dwarf2out.c:24071
0x8d5cd4 dwarf2out_imported_module_or_decl
        ../../gcc/dwarf2out.c:24143
0x75483a gfc_trans_use_stmts
        ../../gcc/fortran/trans-decl.c:4882
0x7554c8 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6431
0x6df570 translate_all_program_units
        ../../gcc/fortran/parse.c:5940
0x6df570 gfc_parse_file()
        ../../gcc/fortran/parse.c:6146
0x722652 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:198

Reply via email to