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

            Bug ID: 103259
           Summary: [11/12 Regression] ICE in resolve_common_vars, at
                    fortran/resolve.c:956
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20201004 and 20201018 :


$ cat z1.f90
module m
   integer :: p
   common /q/ p
end
program p
   use m
end


$ gfortran-12-20211114 -c z1.f90
z1.f90:6:8:

    6 |    use m
      |        1
Error: 'p' of module 'm', imported at (1), is also the name of the current
program unit

Segmentation fault
0xf04a8f crash_signal
        ../../gcc/toplev.c:322
0x7d6bd8 gfc_format_decoder
        ../../gcc/fortran/error.c:1062
0x1d8de90 pp_format(pretty_printer*, text_info*)
        ../../gcc/pretty-print.c:1475
0x1d6ff25 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/diagnostic.c:1346
0x7d6d99 gfc_report_diagnostic
        ../../gcc/fortran/error.c:874
0x7d83a0 gfc_error_now(char const*, ...)
        ../../gcc/fortran/error.c:1343
0x84287a resolve_common_vars
        ../../gcc/fortran/resolve.c:956
0x842a5d resolve_common_blocks
        ../../gcc/fortran/resolve.c:1024
0x857e36 resolve_types
        ../../gcc/fortran/resolve.c:17440
0x8533bc gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17568
0x83b684 resolve_all_program_units
        ../../gcc/fortran/parse.c:6573
0x83b684 gfc_parse_file()
        ../../gcc/fortran/parse.c:6829
0x8896bf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

Reply via email to