! RUN: %flang_fc1 -emit-hlfir %s -o - | FileCheck %s ! CHECK-LABEL: tok_form1 subroutine tok_form1() implicit none character(:), allocatable :: tokens(:) call tokenize("a,b", ",", tokens) ! CHECK-DAG: %[[TOKENS:.*]] = fir.alloca !fir.box>>> ! CHECK-DAG: %[[TOKENS_DECL:.*]]:2 = hlfir.declare %[[TOKENS]] {fortran_attrs = #fir.var_attrs ! CHECK-DAG: %[[TOKENS_NONE:.*]] = fir.convert %[[TOKENS_DECL]]#0 : (!fir.ref>>>>) -> !fir.ref> ! CHECK-DAG: %[[SEP_NONE:.*]] = fir.zero_bits !fir.ref> ! CHECK: fir.call @_FortranATokenize(%[[TOKENS_NONE]], %[[SEP_NONE]], end subroutine tok_form1 ! CHECK-LABEL: tok_form2 subroutine tok_form2() implicit none integer, allocatable :: first(:), last(:) call tokenize("a,,b", ",", first, last) ! CHECK-DAG: %[[FIRST:.*]] = fir.alloca !fir.box>> ! CHECK-DAG: %[[LAST:.*]] = fir.alloca !fir.box>> ! CHECK-DAG: %[[FIRST_DECL:.*]]:2 = hlfir.declare %[[FIRST]] {fortran_attrs = #fir.var_attrs ! CHECK-DAG: %[[LAST_DECL:.*]]:2 = hlfir.declare %[[LAST]] {fortran_attrs = #fir.var_attrs ! CHECK-DAG: %[[FIRST_NONE:.*]] = fir.convert %[[FIRST_DECL]]#0 : (!fir.ref>>>) -> !fir.ref> ! CHECK-DAG: %[[LAST_NONE:.*]] = fir.convert %[[LAST_DECL]]#0 : (!fir.ref>>>) -> !fir.ref> ! CHECK: fir.call @_FortranATokenizePositions(%[[FIRST_NONE]], %[[LAST_NONE]], end subroutine tok_form2