Use the targert byte stride in pointer associate
with remapping since the target might have been reboxed
as shown in this example.
p(-1:,-2:) => z(:,1:5)
Differential D143391
[flang] Use target byte stride in pointer remapping clementval on Feb 6 2023, 5:42 AM. Authored by
Details
Use the targert byte stride in pointer associate p(-1:,-2:) => z(:,1:5)
Diff Detail
Event TimelineComment Actions I do not think this is possible. The pointer and target may have different rank. So the strides cannot be taken from the target. Pointers with bounds remapping requires the target to be simply contiguous or of rank one: Fortran 2018 10.2.2.3 point 9: "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" The following is possible and requires computing the new strides in the runtime as this was done: subroutine test2(p, z) integer, pointer :: p(:, :, :), z(:) p(1:4,1:8,1:16) => z(1:1024:2) end subroutine |