In the release 2019 of Intel Fortran compiler there is now the new option of array shape checking, as reported here:
Now, in the following code
program intele33 implicit none integer, dimension(8,2), target :: i integer, dimension(:), pointer :: j j(1:) => i(:,2) end program
while running I obtain the following warning (compiled with check all option):
forrtl: warning (406): fort: (33): Shape mismatch: The extent of dimension 1 of array J is 0 and the corresponding extent of array I is 8
but the resulting code is however perfectly working. gfortran does not issue this warning.
If I remove the lbound remapping
j => i(:,2)
there is no warning/error.
This is strange, since in both cases the pointer i has lower bound 1.
Juergen R. wrote:
I do not get any warning with the 19.0 release version neither for -check shape nor with -check all.
I have updated the issue description, please read it. Thank you.