! Test assumed-rank dummy argument that is not present in ! all ENTRY statements. ! RUN: bbc -emit-hlfir -o - %s | FileCheck %s subroutine test_main_entry(x) real :: x(..) interface subroutine some_proc(x) real :: x(..) end subroutine end interface call some_proc(x) entry test_alternate_entry() call the_end() end subroutine ! CHECK-LABEL: func.func @_QPtest_main_entry( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.box> {fir.bindc_name = "x"}) { ! CHECK: %[[VAL_1:.*]] = fir.dummy_scope : !fir.dscope ! CHECK: %[[VAL_2:.*]]:2 = hlfir.declare %[[VAL_0]] dummy_scope %[[VAL_1]] arg {{[0-9]+}} {uniq_name = "_QFtest_main_entryEx"} : (!fir.box>, !fir.dscope) -> (!fir.box>, !fir.box>) ! CHECK-LABEL: func.func @_QPtest_alternate_entry() { ! CHECK: %[[VAL_0:.*]] = fir.alloca !fir.box>> ! CHECK: %[[VAL_1:.*]] = fir.zero_bits !fir.heap ! CHECK: %[[VAL_2:.*]] = fir.embox %[[VAL_1]] : (!fir.heap) -> !fir.box> ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.box>) -> !fir.box>> ! CHECK: fir.store %[[VAL_3]] to %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_5:.*]]:2 = hlfir.declare %[[VAL_4]] {uniq_name = "_QFtest_main_entryEx"} : (!fir.box>>) -> (!fir.box>, !fir.box>)