https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107406
Bug ID: 107406 Summary: lock_type Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: damian at archaeologic dot codes Target Milestone: --- gfortran 12.2 accepts the code below if the "allocatable" attribute is removed: % cat gfortran-lock-issue.f90 use iso_fortran_env type foo type(lock_type), allocatable :: bar end type type(foo) foobar[*] end % gfortran -fcoarray=single gfortran-lock-issue.f90 gfortran-lock-issue.f90:3:39: 3 | type(lock_type), allocatable :: bar | 1 Error: Allocatable component bar at (1) of type LOCK_TYPE must have a codimension The NAG compiler accepts the above code and I believe constraint C1608 in the Fortran 2018 standard makes the above code valid. Is this related to PR 92122?