I am facing an issue with Intel 188.8.131.52.
The issue is that when we want to have 1D pointer to a 3D array that is contained into a type, the compiler is reporting that the data target must be simply contiguous or of rank one.
However, when the array is not contain into a type, it does work. The issue is also not present in Intel 15.x or 14.x series.
Any ideas ?
program test implicit none type :: t_con real, allocatable :: array(:,:,:) end type integer, parameter :: N=30 real, allocatable, target :: a(:,:,:) real, pointer :: p(:) real, pointer :: p1(:) type(t_con), target :: t_a allocate(a(N,N,N)) allocate(t_a%array(N,N,N)) a=0.0 t_a%array = 0.0 p(1:30) => a(:,:,3) p(2) = 500.0 print *, p(2), a(2,1,3) p1(1:30) => t_a%array(:,:,3) p1(2) = 200.0 print *, p1(2), t_a%array(2,1,3) nullify(p) deallocate(a) deallocate(t_a%array) end program test
It's a bug we introduced - we apologize for the inconvenience. I have escalated this to development as issue DPD200414795 and will let you know here of its progress.
Sorry, there is no update from Development regarding this defect. The internal issue Steve submitted to Development was updated this week with a urgent status inquiry to the Developer that was received through the Intel Premier support issue filed on this defect (It appears that was submitted by a colleague of yours). I'll share any update we receive from the Developer within this forum thread.
p(1:30) => a(:,:,3)
The LHS expresses a 30 element array (via pointer), the RHS expresses a 30*30 (900) element array slice. Is this valid?
It might be more clear (to the compiler) with
p(1:30) => a(:,J,3)
p(1:30) => a(J,:,3)
Where J indicates the additional information as to how you wish to slice the data.
I just learned there is a fix for the issue that Development is targeting for a future 17.0 update. It is possible it will be in the next 17.0 Update 2 next month. I'll update this forum thread when I know more.