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

            Bug ID: 103471
           Summary: [9/10/11/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: ---

Some time ago, r8 was corrected, between 20191115 (ICE)
and 20200507 (error), but the ICE appeared again in r9 :
(follow-up of pr93484)


$ cat z1.f90
program p
   implicit none
   print *, [real(x(k))]
end


$ gfortran-8 -c z1.f90
z1.f90:3:21:

    print *, [real(x(k))]
                     1
Error: Symbol 'k' at (1) has no IMPLICIT type


$ gfortran-12-20211128 -c z1.f90
z1.f90:1:9:

    1 | program p
      |         1
internal compiler error: in gfc_typenode_for_spec, at
fortran/trans-types.c:1114
0x8d8bb0 gfc_typenode_for_spec(gfc_typespec*, int)
        ../../gcc/fortran/trans-types.c:1114
0x8d8db6 gfc_sym_type(gfc_symbol*, bool)
        ../../gcc/fortran/trans-types.c:2272
0x875938 gfc_get_symbol_decl(gfc_symbol*)
        ../../gcc/fortran/trans-decl.c:1813
0x87830f generate_local_decl
        ../../gcc/fortran/trans-decl.c:5848
0x834652 do_traverse_symtree
        ../../gcc/fortran/symbol.c:4174
0x87944c generate_local_vars
        ../../gcc/fortran/trans-decl.c:6054
0x87944c gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:7579
0x7fc90e translate_all_program_units
        ../../gcc/fortran/parse.c:6638
0x7fc90e gfc_parse_file()
        ../../gcc/fortran/parse.c:6925
0x84967f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

Reply via email to