- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use the -assume realloc_lhs or -standard-semantics compile flags to get standard-conforming behavior, assignment to an allocatable lhs array works properly under most circumstances. However, here is an example (attached) where it doesn't. In this case the rhs vector is polymorphic and the assignment statement is in one of the TYPE IS stanzas of a SELECT TYPE construct applied to the polymorphic vector. This is standard conforming and works with other compilers, but the Intel 14.0.2 compiler produces code that gives a run-time error at that assignment statement. See the attached example.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this and for the convenient reproducer Neil. I have reproduced this and escalated it to our Fortran Development team (see internal tracking id below) for analysis/repair and will keep your post updated regarding the status of a fix.
(Internal tracking id: DPD200255963)
Resolution Update on 08/10/2015): This defect is fixed in the Intel® Parallel Studio XE 2015 Update 3 release (2015.0.090 - Linux)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kevin,
Is this a regression, meaning it worked previously but got broken due to other changes in the compiler? I ask because I think I've used such a feature successfully in some of my code built most likely with compiler version 13 on Windows but it may take me some time to dig through a ton of code across many libraries to find it.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FortranFan, Your situation may be different, but in my case I'm seeing this error for 13.1.2 as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It does not appear to be a regression. My findings concur with Neil's. I checked back to 12.1 where it was also present. It is also present in the current 15.0 Beta compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Incidently, my work-around for the assignment in
select type (v) type is (integer) val = v end select
is to replace it with
if (allocated(val)) deallocate(val) allocate(val(size(v)), source=v)
It's not exactly the same (val is always reallocated) but it's working in my use cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Neil, I discovered that this defect was fixed in the Intel® Parallel Studio XE 2015 release (2015.0.090 - Linux) after investigating a similar issue. I must have missed an earlier notification of that. My apologies for the delayed notification.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page