Bug 53951 - [OOP] Later TARGET statement ignored for CLASS
Summary: [OOP] Later TARGET statement ignored for CLASS
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-07-13 13:12 UTC by Tobias Burnus
Modified: 2013-06-11 19:18 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-06-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2012-07-13 13:12:15 UTC
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
Comment 1 Dominique d'Humieres 2013-06-11 19:18:00 UTC
Still present at revision 199959.