| 1 |
! Test non-contiguous slice of parameter array. |
| 2 |
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s |
| 3 |
subroutine test2(i) |
| 4 |
integer, parameter :: a(*,*) = reshape( [ 1,2,3,4 ], [ 2,2 ]) |
| 5 |
integer :: x(2) |
| 6 |
x = a(i,:) |
| 7 |
end subroutine test2 |
| 8 |
! Check that the result type of the designate operation |
| 9 |
! is a box (as opposed to !fir.ref<!fir.array<>>) that is able |
| 10 |
! to represent non-contiguous array section: |
| 11 |
! CHECK: hlfir.designate {{.*}} shape {{.*}} : (!fir.ref<!fir.array<2x2xi32>>, i64, index, index, index, !fir.shape<1>) -> !fir.box<!fir.array<2xi32>> |