! RUN: %flang_fc1 -emit-hlfir %s -o - | FileCheck %s ! CHECK-LABEL: func.func @_QPadjustr_test() { subroutine adjustr_test character(len=12) :: adjust_str = '0123456789 ' ! CHECK: %[[strBox:.*]] = fir.alloca !fir.box>> ! CHECK: %[[addr0:.*]] = fir.address_of(@_QFadjustr_testEadjust_str) : !fir.ref> ! CHECK: %[[c12:.*]] = arith.constant 12 : index ! CHECK: %[[decl:.*]]:2 = hlfir.declare %[[addr0]] typeparams %[[c12]] {{.*}} : (!fir.ref>, index) -> (!fir.ref>, !fir.ref>) ! CHECK: %[[eBox:.*]] = fir.embox %[[decl]]#0 : (!fir.ref>) -> !fir.box> ! CHECK: %[[r0:.*]] = fir.zero_bits !fir.heap> ! CHECK: %[[r1:.*]] = fir.embox %[[r0]] : (!fir.heap>) -> !fir.box>> ! CHECK: fir.store %[[r1]] to %[[strBox]] : !fir.ref>>> ! CHECK: %[[r2:.*]] = fir.address_of(@_QQ{{.*}}) : !fir.ref> ! CHECK: %[[r3:.*]] = fir.convert %[[strBox]] : (!fir.ref>>>) -> !fir.ref> ! CHECK: %[[r4:.*]] = fir.convert %[[eBox]] : (!fir.box>) -> !fir.box ! CHECK: %[[r5:.*]] = fir.convert %[[r2]] : (!fir.ref>) -> !fir.ref ! CHECK: fir.call @_FortranAAdjustr(%[[r3]], %[[r4]], %[[r5]], %{{.*}}) {{.*}}: (!fir.ref>, !fir.box, !fir.ref, i32) -> () adjust_str = adjustr(adjust_str) end subroutine