- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
following code:
program ala
real, dimension(:), allocatable :: a
allocate(a(2))
a = 0.0
a = min(a, 1.0)
print *, a
deallocate(a)
end program ala
causes ICE when compiled with: ifort -assume realloc_lhs ala.f90
Compiler that I've used:
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.0.079 Build 20120731
Best regards,
Kacper Kowalik
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HeinzB (Intel) wrote:
Might be a good workaround for you: Swapping the arguments for MIN() prevents the bug; a = min(1.0, a) works as expected.
That bug is still present in 13.0.1 and that workaround cannot be applied to all intrinsic funtion, like "ishft" where order of arguments matter. Better way to avoid this is to explictly disable realloc_lhs in offending lines by adding (:), e.g. a(:) = min(a, 1.0)
Cheers,
Kacper
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just noticed that new version of the compiler was released yesterday with the fix, sorry for the noise :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not fixed quite yet. Although it now works for original code with "min" it still ICEs for other functions (with ifort-13.1):
[fortran]
program ala
integer, dimension(:), allocatable :: a
allocate(a(2))
a = 0
a = ishft(a, -1)
deallocate(a)
end program ala
[/fortran]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sigh - I can reproduce this and will report it. Thanks. Issue ID is DPD200240757.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kacper, the problem with ishft is expected to be fixed in Update 3. We have gone through all of the intrinsics where this could be a problem and implemented a common solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ICE has been fixed by 13.0 Update 1 already; sorry for the late update. I just tested Update 2 and it doesn't show the ICE either.
Heinz

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