brintos

brintos / llvm-project-archived public Read only

0
0
Text · 823 B · e8e7f75 Raw
19 lines · plain
1! Test lowering of of expressions as values2! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s3 4! CHECK-LABEL: func.func @_QPfoo()5subroutine foo()6  print *, 427  ! CHECK: %[[c42:.*]] = arith.constant 42 : i328  ! CHECK: fir.call @_FortranAioOutputInteger32(%{{.*}}, %[[c42]]) {{.*}}: (!fir.ref<i8>, i32) -> i19end subroutine10 11! CHECK-LABEL: func.func @_QPfoo_designator(12! CHECK-SAME: %[[arg0:.*]]: !fir.ref<i32>13subroutine foo_designator(n)14  !CHECK:  %[[n:.*]]:2 = hlfir.declare %[[arg0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QFfoo_designatorEn"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)15  print *, n16  ! CHECK: %[[nval:.*]] = fir.load %[[n]]#0 : !fir.ref<i32>17  ! CHECK: fir.call @_FortranAioOutputInteger32(%{{.*}}, %[[nval]]) {{.*}}: (!fir.ref<i8>, i32) -> i118end subroutine19