- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could it be that warning 8589 is wrong if the data target is simply contiguous?
A complete minimal program would be this ('main.f90'):
real, target :: rank2_data(10,10) real, pointer :: rank1_ptr(:) rank1_ptr(1:100) => rank2_data end
Compiling with `ifort -stand f15 main.f90`, I get main.f90(3): warning #8589: Fortran 2015 specifies that if a bound remapping list is specified, data target must be of rank one. [RANK2_DATA]. I'm using ifort version 18.0.1.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you are correct. The warning is no longer flagged in the beta version of ifort 19.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it more than a misguided warning? That is, is there a special reason to suspect that rank-2 data targets do not compile correctly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The F2008 standard says:
If bounds-remapping-list is specified, the pointer target shall be simply contiguous (6.5.4) or of rank one.
The F2018 draft standard says:
If bounds-remapping-list appears, it specifies the upper and lower bounds of each dimension of the pointer, and thus the extents; the pointer target shall be simply contiguous (9.5.4) or of rank one, ...
Note that both standards say that the target shall be either "simply contiguous" or of rank one. If the compiler is ignoring the "simply contiguous" case, that's incorrect (and the message's wording is incorrect regardless.)
In your example, the target is indeed "simply contiguous".

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