1 ! RUN: bbc %s -o "-" -emit-fir | FileCheck %s
5 ! CHECK-LABEL: func @_QPsub1()
11 ! CHECK-LABEL: func @_QPsub2()
12 ! CHECK: fir.call @_QPsub1() {{.*}}: () -> ()
19 ! CHECK-LABEL: func @_QPsub3(
20 ! CHECK-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "a"},
21 ! CHECK-SAME: %{{.*}}: !fir.ref<f32> {fir.bindc_name = "b"})
27 ! CHECK-LABEL: func @_QPsub4() {
28 ! CHECK-DAG: %[[REAL_VALUE:.*]] = fir.alloca f32 {adapt.valuebyref}
29 ! CHECK-DAG: %[[INT_VALUE:.*]] = fir.alloca i32 {adapt.valuebyref}
30 ! CHECK: %[[C2:.*]] = arith.constant 2 : i32
31 ! CHECK: fir.store %[[C2]] to %[[INT_VALUE]] : !fir.ref<i32>
32 ! CHECK: %[[C3:.*]] = arith.constant 3.000000e+00 : f32
33 ! CHECK: fir.store %[[C3]] to %[[REAL_VALUE]] : !fir.ref<f32>
34 ! CHECK: fir.call @_QPsub3(%[[INT_VALUE]], %[[REAL_VALUE]]) {{.*}}: (!fir.ref<i32>, !fir.ref<f32>) -> ()
36 subroutine call_fct1()
41 ! CHECK-LABEL: func @_QPcall_fct1()
42 ! CHECK: %[[A:.*]] = fir.alloca f32 {bindc_name = "a", uniq_name = "_QFcall_fct1Ea"}
43 ! CHECK: %[[B:.*]] = fir.alloca f32 {bindc_name = "b", uniq_name = "_QFcall_fct1Eb"}
44 ! CHECK: %[[C:.*]] = fir.alloca f32 {bindc_name = "c", uniq_name = "_QFcall_fct1Ec"}
45 ! CHECK: %[[RES:.*]] = fir.call @_QPfct1(%[[A]], %[[B]]) {{.*}}: (!fir.ref<f32>, !fir.ref<f32>) -> f32
46 ! CHECK: fir.store %[[RES]] to %[[C]] : !fir.ref<f32>
49 ! CHECK: func private @_QPfct1(!fir.ref<f32>, !fir.ref<f32>) -> f32