! RUN: %flang_fc1 -emit-hlfir %s -o - | FileCheck %s ! CHECK-LABEL: adjustl_test subroutine adjustl_test character(len=12) :: adjust_str = ' 0123456789' ! CHECK: %[[strBox:.*]] = fir.alloca !fir.box>> ! CHECK: %[[addr:.*]] = fir.address_of(@_QFadjustl_testEadjust_str) : !fir.ref> ! CHECK: %[[str_decl:.*]]:2 = hlfir.declare %[[addr]] ! CHECK: %[[eBox:.*]] = fir.embox %[[str_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 @_FortranAAdjustl(%[[r3]], %[[r4]], %[[r5]], %{{.*}}) {{.*}}: (!fir.ref>, !fir.box, !fir.ref, i32) -> () adjust_str = adjustl(adjust_str) end subroutine