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

            Bug ID: 103258
           Summary: [12 Regression] ICE in gfc_typenode_for_spec, at
                    fortran/trans-types.c:1114
           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: ---

This changed between 20211031 and 20211107 :


$ cat z1.f90
subroutine s(n)
implicit none
character(n+m) :: c
entry e(m)
end


$ gfortran-12-20211031 -c z1.f90
z1.f90:1:14:

    1 | subroutine s(n)
      |              1
Error: Symbol 'n' at (1) has no IMPLICIT type


$ gfortran-12-20211114 -c z1.f90
z1.f90:1:12:

    1 | subroutine s(n)
      |            1
internal compiler error: in gfc_typenode_for_spec, at
fortran/trans-types.c:1114
0x8d7590 gfc_typenode_for_spec(gfc_typespec*, int)
        ../../gcc/fortran/trans-types.c:1114
0x8d7796 gfc_sym_type(gfc_symbol*, bool)
        ../../gcc/fortran/trans-types.c:2272
0x8d5c6f gfc_get_function_type(gfc_symbol*, gfc_actual_arglist*, char const*)
        ../../gcc/fortran/trans-types.c:3126
0x86aa04 build_function_decl
        ../../gcc/fortran/trans-decl.c:2390
0x872976 gfc_create_function_decl(gfc_namespace*, bool)
        ../../gcc/fortran/trans-decl.c:3099
0x878fee gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:7461
0x7fb32e translate_all_program_units
        ../../gcc/fortran/parse.c:6638
0x7fb32e gfc_parse_file()
        ../../gcc/fortran/parse.c:6925
0x84806f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

Reply via email to