[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / flang / test / Lower / OpenACC / stop-stmt-in-region.f90
blob4b3e5632650f1cfce76930b583283d2c9eb55d13
1 ! This test checks lowering of stop statement in OpenACC region.
3 ! RUN: bbc -fopenacc -emit-fir %s -o - | FileCheck %s
4 ! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s
5 ! RUN: %flang_fc1 -emit-fir -fopenacc %s -o - | FileCheck %s
6 ! RUN: %flang_fc1 -emit-hlfir -fopenacc %s -o - | FileCheck %s
8 ! CHECK-LABEL: func.func @_QPtest_stop_in_region1() {
9 ! CHECK: acc.parallel {
10 ! CHECK: %[[VAL_0:.*]] = arith.constant 1 : i32
11 ! CHECK: %[[VAL_1:.*]] = arith.constant false
12 ! CHECK: %[[VAL_2:.*]] = arith.constant false
13 ! CHECK: %[[VAL_3:.*]] = fir.call @_FortranAStopStatement(%[[VAL_0]], %[[VAL_1]], %[[VAL_2]]) {{.*}} : (i32, i1, i1) -> none
14 ! CHECK: acc.yield
15 ! CHECK: }
16 ! CHECK: return
17 ! CHECK: }
19 subroutine test_stop_in_region1()
20 !$acc parallel
21 stop 1
22 !$acc end parallel
23 end
25 ! CHECK-LABEL: func.func @_QPtest_stop_in_region2() {
26 ! CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFtest_stop_in_region2Ex"}
27 ! CHECK: acc.parallel {
28 ! CHECK: %[[VAL_1:.*]] = arith.constant 1 : i32
29 ! CHECK: %[[VAL_2:.*]] = arith.constant false
30 ! CHECK: %[[VAL_3:.*]] = arith.constant false
31 ! CHECK: %[[VAL_4:.*]] = fir.call @_FortranAStopStatement(%[[VAL_1]], %[[VAL_2]], %[[VAL_3]]) {{.*}} : (i32, i1, i1) -> none
32 ! CHECK: acc.yield
33 ! CHECK: }
34 ! CHECK: return
35 ! CHECK: }
37 subroutine test_stop_in_region2()
38 integer :: x
39 !$acc parallel
40 stop 1
41 x = 2
42 !$acc end parallel
43 end