https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99837
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING CC| |kargl at gcc dot gnu.org Last reconfirmed| |2024-02-28 Ever confirmed|0 |1 --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to G. Steinmetz from comment #0) > Follow-up of pr88357, affects versions down to at least r5. > With a missing attribute allocatable or pointer : > > $ cat z1.f90 > program p > type t > integer, allocatable :: a(:) > end type > class(t) :: x[:] > associate (y => x) > end associate > end This now gives % gfcx -o z -fcoarray=single a.f90 a.f90:6:19: 6 | class(t) :: x[:] | 1 Error: Coarray variable 'x' at (1) shall not have codimensions with deferred shape > $ cat z2.f90 > program p > type t > integer, allocatable :: a(:) > end type > class(t) :: x[*] > associate (y => x) > end associate > end This gives % gfcx -o z -fcoarray=single a.f90 a.f90:6:19: 6 | class(t) :: x[*] | 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer