https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107681
Bug ID: 107681 Summary: [13 Regression] ICE in gfc_type_is_extensible, at fortran/resolve.cc:9018 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started between 20220717 and 20220724 : (gcc configured with --enable-checking=yes) $ cat z1.f90 program p type t integer, allocatable :: a end type class(t) :: x[*] associate (y => x) end associate end $ cat z2.f90 program p type t integer, allocatable :: a end type class(t) :: x[:] associate (y => x) end associate end $ gfortran-12 -c z1.f90 -fcoarray=lib z1.f90:5:19: 5 | class(t) :: x[*] | 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer $ gfortran-13-20221106 -c z1.f90 -fcoarray=lib z1.f90:5:19: 5 | class(t) :: x[*] | 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer z1.f90:6:20: 6 | associate (y => x) | 1 Error: Invalid array reference of a non-array entity at (1) f951: internal compiler error: Segmentation fault 0xf4697f crash_signal ../../gcc/toplev.cc:314 0x6b337f gfc_type_is_extensible(gfc_symbol*) ../../gcc/fortran/resolve.cc:9018 0x6b337f resolve_fl_var_and_proc ../../gcc/fortran/resolve.cc:12970 0x87c32d resolve_fl_variable ../../gcc/fortran/resolve.cc:13089 0x87c32d resolve_symbol ../../gcc/fortran/resolve.cc:16183 0x89ad62 do_traverse_symtree ../../gcc/fortran/symbol.cc:4180 0x87efd4 resolve_types ../../gcc/fortran/resolve.cc:17542 0x87a43c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.cc:17657 0x87840c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.cc:17644 0x87840c resolve_block_construct ../../gcc/fortran/resolve.cc:10825 0x87840c gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.cc:12258 0x87a387 resolve_codes ../../gcc/fortran/resolve.cc:17624 0x87a44e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.cc:17659 0x862214 resolve_all_program_units ../../gcc/fortran/parse.cc:6631 0x862214 gfc_parse_file() ../../gcc/fortran/parse.cc:6887 0x8b0c8f gfc_be_parse_file ../../gcc/fortran/f95-lang.cc:229