- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just came across a small issue with the ASSOCIATE construct
If you associate to a field within a type which originally had the TARGET attribute, you can no longer assign a pointer to the field through the associated variable. See my small example below.
I believe, this code should be legal, but I haven't really studied the F2003 specification on that issue.
I'm using IVF11.0.65
best regards,
Thomas
[fortran] program AssociateTargetProb implicit none ! Variables TYPE TypeA REAL :: Val END TYPE Type(TypeA), TARGET :: AType REAL, POINTER :: ARealPtr ! Body ARealPtr => AType%Val ASSOCIATE ( A => AType%Val ) ARealPtr => A END ASSOCIATE end program [/fortran]
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think this should be legal too. The standard says: "The associating entity has the ASYNCHRONOUS, TARGET, or VOLATILE attribute if and only if the selector is a variable and has the attribute." [8.1.4.3] The definition of "variable" in section 6 includes "structure-component". Lastly, 5.1.2.14 says "If an object has the TARGET attribute. then all of its nonpointer subobjects also have the TARGET attribute."
I will report this to the developers. Issue ID is DPD200158406.
I will report this to the developers. Issue ID is DPD200158406.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just checked and this issue seems to be fixed with the new Composer XE 2011 release.
Thank you,
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, so it is. I missed this one.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page