What happened?
On the nvfortran 22.11 the compiler repacks sliced arrays passed as arguments to a contiguous temporary array. This return wrong strides of the sliced array.
What are the steps to reproduce the bug?
On nvfortran 22.11 (and possibly other NVHPC compilers since they repack array by default) the following fckit strides computation is incorrect:
use fckit_array_module, only : array_strides
integer(c_int) :: existing_data(8, 2, 3, 4)
print *, array_strides( existing_data(1, :, 2, :)) )
This returns [1, 2] instead of expected [8, 48].
If the flag -Mnotarget_temps is passed, the nvfortran compiler will not repack the temporaries and then we get the correct results.
Version
develop
Platform (OS and architecture)
nvfortran 22.11
Relevant log output
Accompanying data
No response
Organisation
No response
What happened?
On the nvfortran 22.11 the compiler repacks sliced arrays passed as arguments to a contiguous temporary array. This return wrong strides of the sliced array.
What are the steps to reproduce the bug?
On nvfortran 22.11 (and possibly other NVHPC compilers since they repack array by default) the following fckit strides computation is incorrect:
This returns
[1, 2]instead of expected[8, 48].If the flag
-Mnotarget_tempsis passed, the nvfortran compiler will not repack the temporaries and then we get the correct results.Version
develop
Platform (OS and architecture)
nvfortran 22.11
Relevant log output
Accompanying data
No response
Organisation
No response