12 lines · plain
1! Test non-contiguous slice of parameter array.2! RUN: bbc -emit-hlfir -o - %s | FileCheck %s3subroutine test2(i)4 integer, parameter :: a(*,*) = reshape( [ 1,2,3,4 ], [ 2,2 ])5 integer :: x(2)6 x = a(i,:)7end subroutine test28! Check that the result type of the designate operation9! is a box (as opposed to !fir.ref<!fir.array<>>) that is able10! 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>>12