brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 3135a63 Raw
29 lines · plain
1! Test assumed-rank dummy argument that is not present in2! all ENTRY statements.3! RUN: bbc -emit-hlfir -o - %s | FileCheck %s4 5subroutine test_main_entry(x)6  real :: x(..)7  interface8  subroutine some_proc(x)9    real :: x(..)10  end subroutine11  end interface12  call some_proc(x)13entry test_alternate_entry()14  call the_end()15end subroutine16! CHECK-LABEL:   func.func @_QPtest_main_entry(17! CHECK-SAME:                                  %[[VAL_0:.*]]: !fir.box<!fir.array<*:f32>> {fir.bindc_name = "x"}) {18! CHECK:           %[[VAL_1:.*]] = fir.dummy_scope : !fir.dscope19! CHECK:           %[[VAL_2:.*]]:2 = hlfir.declare %[[VAL_0]] dummy_scope %[[VAL_1]] arg {{[0-9]+}} {uniq_name = "_QFtest_main_entryEx"} : (!fir.box<!fir.array<*:f32>>, !fir.dscope) -> (!fir.box<!fir.array<*:f32>>, !fir.box<!fir.array<*:f32>>)20 21! CHECK-LABEL:   func.func @_QPtest_alternate_entry() {22! CHECK:           %[[VAL_0:.*]] = fir.alloca !fir.box<!fir.heap<!fir.array<*:f32>>>23! CHECK:           %[[VAL_1:.*]] = fir.zero_bits !fir.heap<f32>24! CHECK:           %[[VAL_2:.*]] = fir.embox %[[VAL_1]] : (!fir.heap<f32>) -> !fir.box<!fir.heap<f32>>25! CHECK:           %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.box<!fir.heap<f32>>) -> !fir.box<!fir.heap<!fir.array<*:f32>>>26! CHECK:           fir.store %[[VAL_3]] to %[[VAL_0]] : !fir.ref<!fir.box<!fir.heap<!fir.array<*:f32>>>>27! CHECK:           %[[VAL_4:.*]] = fir.load %[[VAL_0]] : !fir.ref<!fir.box<!fir.heap<!fir.array<*:f32>>>>28! CHECK:           %[[VAL_5:.*]]:2 = hlfir.declare %[[VAL_4]] {uniq_name = "_QFtest_main_entryEx"} : (!fir.box<!fir.heap<!fir.array<*:f32>>>) -> (!fir.box<!fir.array<*:f32>>, !fir.box<!fir.array<*:f32>>)29