- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at the Fortran 2003 standard handbook and could not find anywhere that disallow the use of a TARGET attribute inside a TYPE declaration, for example something like this
module junk
type :: abc
integer, target :: i
integer, pointer :: j
end type abc
end module junk
when I compile it using ifort, I would get
error #6516 : This attribute specification is not valid for a component definition statement. [TARGET]
and it points to the target attribute as the problem. I can see why things would be very confusing if this is allowed
but I cannot find where the standard disallows it though.
Anybody has any idea ?
Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at section 4.5.3 of the standard, page 50, where it describes a component of a derived type. The only attributes permitted for a data component are:
- POINTER
- DIMENSION
- ALLOCATABLE
- PUBLIC
- PRIVATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve... I must have missed it when I try to look for it earlier.

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