- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The minloc/maxloc intrinsics return the incorrect result for 0-sized arrays with ifx 2024.0. Here's an example program. Note that the classic ifort compiler doesn't suffer from this error.
real :: a(0), b(2,0), c(3)
logical :: mask(3)
integer :: nfail
nfail = 0
! min/maxloc should return 0 for 0-sized arrays
if (maxloc(a,dim=1) /= 0) nfail = nfail + 1
if (minloc(a,dim=1) /= 0) nfail = nfail + 1
if (any(minloc(b) /= [0,0])) nfail = nfail + 1
if (any(maxloc(b) /= [0,0])) nfail = nfail + 1
! min/maxloc should return 0 when all mask values are false
c = [1.0, 2.0, 3.0]
mask = .false.
if (maxloc(c,dim=1,mask=mask) /= 0) nfail = nfail + 1
if (minloc(c,dim=1,mask=mask) /= 0) nfail = nfail + 1
if (nfail > 0) then
print *, 'failed', nfail, 'tests'
else
print *, 'passed all tests'
end if
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I searched around and found this old thread on the topic:
I tried your example and it works with '-standard-semantics' flag enabled... I do find it strange that such a flag is needed, though. The default behavior should be to follow the standard, then those that need another behavior should set the appropriate flags... Even just '-stand f18' did not help..
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifort was able to detect when an object was created with -ipo.
With ifx, -ipo is translated to -flto, LTO=Link Time Optimization. See an example of using it with ifx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The remedy is to compile all routines involved in a module name mangling with -assume std_mod_proc_name.
The link thing is a red herring, my fault.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »