- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using compiler 15, update 3, I would expect the following simple code should generate a compiler error with the use of an associate-name x without select-type construct; note x is associated with an unlimited polymorphic pointer. Instead, no compiler errors and warnings are generated. At run-time, no exception occurs but nothing is printed for x for the statement on line 10.
program p implicit none class(*), pointer :: ptr allocate( ptr, source=1 ) asc: associate ( x => ptr ) print *, " x = ", x end associate asc deallocate(ptr) stop end program p
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right you are. Since the selector is polymorphic, the associate-name is also. (But the associate-name, X, isn't a pointer - it does have TARGET.) As X is polymorphic, one must reference it within a SELECT TYPE construct.
Escalated as issue DPD200370511.
And with this, I'm officially on vacation. My colleagues will, I hope, take good care of you. See you in a couple of weeks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve. Have a wonderful and safe vacation!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I expect this to be fixed in Update 2 (probably early February).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page