1 ! This test checks lowering of OpenMP DO Directive (Worksharing) with
2 ! monotonic schedule modifier.
4 ! RUN: bbc -fopenmp -emit-fir %s -o - | FileCheck %s
8 !CHECK-LABEL: func @_QQmain()
11 !CHECK: omp.parallel {
13 !$OMP DO SCHEDULE(monotonic:dynamic)
14 !CHECK: %[[ALLOCA_IV:.*]] = fir.alloca i32 {{{.*}}, pinned}
15 !CHECK: %[[WS_LB:.*]] = arith.constant 1 : i32
16 !CHECK: %[[WS_UB:.*]] = arith.constant 9 : i32
17 !CHECK: %[[WS_STEP:.*]] = arith.constant 1 : i32
18 !CHECK: omp.wsloop schedule(dynamic, monotonic) nowait for (%[[I:.*]]) : i32 = (%[[WS_LB]]) to (%[[WS_UB]]) inclusive step (%[[WS_STEP]])
19 !CHECK: fir.store %[[I]] to %[[ALLOCA_IV:.*]] : !fir.ref<i32>
23 !CHECK: %[[RTBEGIN:.*]] = fir.call @_FortranAioBeginExternalListOutput
24 !CHECK: %[[LOAD:.*]] = fir.load %[[ALLOCA_IV]] : !fir.ref<i32>
25 !CHECK: fir.call @_FortranAioOutputInteger32(%[[RTBEGIN]], %[[LOAD]]) {{.*}}: (!fir.ref<i8>, i32) -> i1
26 !CHECK: fir.call @_FortranAioEndIoStatement(%[[RTBEGIN]]) {{.*}}: (!fir.ref<i8>) -> i32
29 !CHECK: omp.terminator