http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53951
Bug #: 53951
Summary: [OOP] Later TARGET statement ignored for CLASS
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Related, but slightly different: PR 51610 and PR 52227.
The following program is rejected as the "TARGET B" comes too late:
C => B ! Valid, but rejected
1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
type t
end type t
class(t), pointer :: C
TARGET :: A
class(t), allocatable :: A, B
TARGET :: B
C => A ! Valid
C => B ! Valid, but rejected
end