21 lines · plain
1! RUN: flang -fc1 -emit-hlfir %s -o - | FileCheck %s2 3program main4 call test06()5 print *,'pass'6end program main7 8subroutine test06()9 type ty110 integer ,allocatable :: a(:,:,:)11 end type ty112 type(ty1) :: str(1)13 integer ,allocatable :: b(:,:,:)14 allocate(str(1)%a(1,1,1),b(1,1,1))15 b=116 write(6,*) "b = ", b17 write(6,*) "reshape((/(b,jj=1,1)/),(/1,1,1/)) = ", reshape((/(b,jj=1,1)/),(/1,1,1/))18 where ((/.true./)) str=(/(ty1(reshape((/(b,jj=1,1)/),(/1,1,1/))),ii=1,1)/)19 ! CHECK: hlfir.exactly_once : !hlfir.expr<1x!fir.type<_QFtest06Tty1{a:!fir.box<!fir.heap<!fir.array<?x?x?xi32>>>}>>20end subroutine test0621