Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
25 Views

Incorrect (or strange) reporting of array shape checking option when pointer lbound remapping is used.

In the release 2019 of Intel Fortran compiler there is now the new option of array shape checking, as reported here:

https://software.intel.com/en-us/articles/array-shape-check-new-in-intel-fortran-compiler-190

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.

0 Kudos
4 Replies
Highlighted
Valued Contributor I
25 Views

I do not get any warning with the 19.0 release version neither for -check shape nor with -check all.

 

0 Kudos
Highlighted
Beginner
25 Views

I removed this post since I ahve updated the first post and topic with a more precise description of the issue.

0 Kudos
Highlighted
Beginner
25 Views

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.

0 Kudos
Highlighted
Valued Contributor I
25 Views

Ok, I overlooked that it is a runtime error message. This indeed looks like a compiler bug to me.

0 Kudos