1 ! RUN: bbc %s -o - | FileCheck %s
3 ! CHECK-LABEL: func @_QPformatassign
4 subroutine formatAssign(flag1
, flag2
, flag3
)
7 logical :: flag1
, flag2
, flag3
9 ! CHECK-DAG: %[[ONE:.*]] = arith.constant 100 : i32
10 ! CHECK-DAG: %[[TWO:.*]] = arith.constant 200 : i32
17 ! CHECK: cond_br %{{.*}}, ^bb[[BLK1:.*]], ^bb[[BLK2:.*]]
19 ! CHECK: fir.store %[[ONE]]
20 ! CHECK: br ^bb[[END_BLOCK:.*]]
22 ! CHECK: fir.store %[[TWO]]
23 ! CHECK: br ^bb[[END_BLOCK]]
24 ! CHECK: ^bb[[END_BLOCK]]
25 ! CHECK: fir.call @{{.*}}BeginExternalFormattedOutput
26 ! CHECK: fir.call @{{.*}}OutputAscii
27 ! CHECK: fir.call @{{.*}}OutputReal32
28 ! CHECK: fir.call @{{.*}}EndIoStatement
30 write(*, label
) " PI=", pi
31 ! CHECK: fir.call @{{.*}}BeginExternalFormattedOutput
32 ! CHECK: fir.call @{{.*}}OutputAscii
33 ! CHECK: fir.call @{{.*}}OutputReal32
34 ! CHECK: fir.call @{{.*}}EndIoStatement
35 if (flag2
) write(*, label
) "2PI=", 2*pi
36 if (flag1
.and
. flag2
.and
. flag3
) then
42 ! CHECK: fir.call @{{.*}}BeginExternalFormattedOutput
43 ! CHECK: fir.call @{{.*}}OutputAscii
44 ! CHECK: fir.call @{{.*}}OutputReal32
45 ! CHECK: fir.call @{{.*}}EndIoStatement
46 write(*, label
) "3PI=", 3*pi
55 ! CHECK-LABEL: func @_QQmain
56 call formatAssign(.true
., .true
., .true
.)
58 call formatAssign(.true
., .false
., .true
.)