Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

weird warning with round-remapping list in pointer

Aldo_H_
Beginner
514 Views

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.

 

0 Kudos
3 Replies
Juergen_R_R
Valued Contributor I
514 Views

I think you are correct. The warning is no longer flagged in the beta version of ifort 19.

 

0 Kudos
Aldo_H_
Beginner
514 Views

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?

0 Kudos
Steve_Lionel
Honored Contributor III
514 Views

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".

0 Kudos
Reply