https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95881
Bug ID: 95881 Summary: [9/10/11 Regression] ICE in resolve_symbol, at fortran/resolve.c:15175 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r7, with a missing attribute : $ cat z1.f90 program p type t real, allocatable :: a[:] end type class(t) :: x allocate (x%a[*]) end $ cat z2.f90 subroutine s(x) type t real, allocatable :: a[:] end type block class(t) :: x allocate (x%a[*]) end block end $ gfortran-6 -c z1.f90 -fcoarray=lib z1.f90:5:16: class(t) :: x 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer $ gfortran-11-20200621 -c z1.f90 -fcoarray=single z1.f90:5:16: 5 | class(t) :: x | 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer $ gfortran-11-20200621 -c z1.f90 -fcoarray=lib f951: internal compiler error: Segmentation fault 0xbce57f crash_signal ../../gcc/toplev.c:328 0x6cda25 resolve_symbol ../../gcc/fortran/resolve.c:15175 0x6ebde2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x6d1094 resolve_types ../../gcc/fortran/resolve.c:17175 0x6cc7ac gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b48ec resolve_all_program_units ../../gcc/fortran/parse.c:6246 0x6b48ec gfc_parse_file() ../../gcc/fortran/parse.c:6493 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212