http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53191
Bug #: 53191 Summary: [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: pa...@gcc.gnu.org "A part-name to the right of a part-ref with non-zero rank shall not have the POINTER or ALLOCATABLE attribute" is not implemented for class expressions. implicit none type t0 integer :: j = 42 end type t0 type, extends(t0) :: t1 integer :: k = 99 end type t1 type t integer :: i class(t0), allocatable :: foo end type t type(t) :: m(4) integer :: n do n = 1, 2 allocate(m(n)%foo, source = t0(n*99)) end do do n = 3, 4 allocate(m(n)%foo, source = t1(n*99, n*999)) end do end Should not be permitted, according to this constraint. At present, it compiles and does the intended thing at runtime. Cheers Paul