Files
clang-p2996/flang/test/Lower/HLFIR/designators-parameter-array-slice.f90
jeanPerier d0829fbded [flang] Enable polymorphic lowering by default (#83285)
Polymorphic entity lowering status is good. The main remaining TODO is
to allow lowering of vector subscripted polymorphic entity, but this
does not deserve blocking all application using polymorphism.

Remove experimental option and enable lowering of polymorphic entity by
default.
2024-03-19 11:45:31 +01:00

12 lines
545 B
Fortran

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