1 ! Test lowering of of expressions as values
2 ! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s
4 ! CHECK-LABEL: func.func @_QPfoo()
7 ! CHECK: %[[c42:.*]] = arith.constant 42 : i32
8 ! CHECK: fir.call @_FortranAioOutputInteger32(%{{.*}}, %[[c42]]) {{.*}}: (!fir.ref<i8>, i32) -> i1
11 ! CHECK-LABEL: func.func @_QPfoo_designator(
12 ! CHECK-SAME: %[[arg0:.*]]: !fir.ref<i32>
13 subroutine foo_designator(n
)
14 !CHECK: %[[n:.*]]:2 = hlfir.declare %[[arg0]] dummy_scope %{{[0-9]+}} {uniq_name = "_QFfoo_designatorEn"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
16 ! CHECK: %[[nval:.*]] = fir.load %[[n]]#0 : !fir.ref<i32>
17 ! CHECK: fir.call @_FortranAioOutputInteger32(%{{.*}}, %[[nval]]) {{.*}}: (!fir.ref<i8>, i32) -> i1