1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
3 ! Check that assumed shape lower bounds are applied before passing the
4 ! descriptor to the runtime call.
6 real, target
:: a(10:20,99:100)
9 subroutine show(bounds
)
10 integer(8) :: bounds(:)
15 call show(ubound(a
, kind
=8))
19 ! CHECK-LABEL: func.func @_QFPs2
20 ! CHECK-SAME: %[[ARG0:.*]]: !fir.box<!fir.array<?x?xf32>>
21 ! CHECK: %[[BOX:.*]] = fir.rebox %[[ARG0]](%{{.*}}) : (!fir.box<!fir.array<?x?xf32>>, !fir.shift<2>) -> !fir.box<!fir.array<?x?xf32>>
22 ! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[BOX]] : (!fir.box<!fir.array<?x?xf32>>) -> !fir.box<none>
23 ! CHECK: %{{.*}} = fir.call @_FortranAUbound(%{{.*}}, %[[BOX_NONE]], %{{.*}}, %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.box<none>, i32, !fir.ref<i8>, i32) -> none