- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!Incorrect output: must be compiled and run
program intrinsic_mmloc_4
integer, allocatable, dimension(:) :: d
integer, allocatable, dimension(:,:) :: a
integer, dimension(2) :: b
allocate (d(0))
if (maxloc (d, 1) .ne. 0) print *,'maxloc fails'
allocate (a(1, 0))
b = minloc (a)
if (any (b .ne. 0)) print *,'minloc fails'
end program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a number of topic on this area. see this one linked beklow and other linked topics maybe that will help. I didn't study your case specificaly.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a number of topic on this area. see this one linked beklow and other linked topics maybe that will help. I didn't study your case specificaly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Andrew, for the suggestion.
The correct execution of the code requires opetion -assume nooldmaxminloc
which adheres to the Fortran standard.
Unfortunately the default option violates the standard.
Closing this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the option -standard-semantics to change defaults that don't match the standard. In all cases, these are situations where earlier versions of the standard were silent, and the developers chose an option that conflicted with a later revision. If existing code would break, or performance would suffer significantly, the default was left the same.
See https://software.intel.com/content/www/us/en/develop/articles/intel-fortran-compiler-support-for-fortran-language-standards.html for a list of these conflicting defaults.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page