22 lines · plain
1! Test property inquiries on variables2! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s3 4module inquired5 real(8), allocatable :: a(:)6end module7 8! CHECK-LABEL: @_QPissue844()9subroutine issue844()10 use inquired11 ! Verify that evaluate::DescriptorInquiry are made using the symbol mapped12 ! in lowering (the use associated one, and not directly the ultimate13 ! symbol).14 15 ! CHECK: %[[a:.*]] = fir.address_of(@_QMinquiredEa) : !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>16 ! CHECK: %[[box_load:.*]] = fir.load %[[a]] : !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>17 ! CHECK: %[[dim:.*]]:3 = fir.box_dims %[[box_load]], %c0{{.*}} : (!fir.box<!fir.heap<!fir.array<?xf64>>>, index) -> (index, index, index)18 ! CHECK: %[[cast:.*]] = fir.convert %[[dim]]#1 : (index) -> i6419 ! CHECK: fir.call @_FortranAioOutputInteger64(%{{.*}}, %[[cast]]) {{.*}}: (!fir.ref<i8>, i64) -> i120 print *, size(a, kind=8)21end subroutine22