[AArch64] Fix brackets warning in assert. NFC
[llvm-project.git] / flang / test / Semantics / OpenACC / acc-routine.f90
blob8281822ca01d0ce1e7e9983382cd28b498617ff3
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenacc
3 subroutine sub1(a)
4 real, dimension(10) :: a
5 end subroutine
7 subroutine sub2(a)
8 !$acc routine(sub1) gang(dim:1)
9 real, dimension(10) :: a
10 call sub1(a)
11 end subroutine
13 subroutine sub3()
14 !$acc routine bind(sub1)
15 end subroutine
17 subroutine sub4()
18 !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive
19 !$acc routine gang(num: 1)
20 end subroutine
22 subroutine sub5()
23 !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive
24 !$acc routine gang(static: 1)
25 end subroutine
27 subroutine sub6()
28 !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive
29 !$acc routine gang gang
31 !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive
32 !$acc routine worker gang
34 !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive
35 !$acc routine vector gang
37 !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive
38 !$acc routine seq gang
40 !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive
41 !$acc routine worker worker
43 !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
44 !$acc routine gang worker
46 !ERROR: Clause WORKER is not allowed if clause VECTOR appears on the ROUTINE directive
47 !$acc routine vector worker
49 !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive
50 !$acc routine seq worker
52 !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
53 !$acc routine vector vector
55 !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive
56 !$acc routine gang vector
58 !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive
59 !$acc routine worker vector
61 !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive
62 !$acc routine seq vector
64 !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive
65 !$acc routine seq seq
67 !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
68 !$acc routine gang seq
70 !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive
71 !$acc routine worker seq
73 !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive
74 !$acc routine vector seq
76 end subroutine
78 subroutine sub7()
79 !$acc routine device_type(*) gang device_type(host) worker
81 !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
82 !$acc routine device_type(*) gang seq
84 !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
85 !$acc routine device_type(*) gang worker
87 !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive
88 !$acc routine gang device_type(*) gang
90 !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
91 !$acc routine gang device_type(*) worker
93 !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive
94 !$acc routine gang device_type(*) vector
96 !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
97 !$acc routine gang device_type(*) seq
99 !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive
100 !$acc routine worker device_type(*) worker
102 !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive
103 !$acc routine worker device_type(*) gang
105 !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive
106 !$acc routine worker device_type(*) vector
108 !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive
109 !$acc routine worker device_type(*) seq
111 !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
112 !$acc routine vector device_type(*) vector
114 !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive
115 !$acc routine vector device_type(*) gang
117 !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
118 !$acc routine vector device_type(*) vector
120 !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive
121 !$acc routine vector device_type(*) seq
123 !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive
124 !$acc routine seq device_type(*) seq
126 !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive
127 !$acc routine seq device_type(*) gang
129 !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive
130 !$acc routine seq device_type(*) vector
132 !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive
133 !$acc routine seq device_type(*) worker
135 !$acc routine device_type(host) seq device_type(nvidia) gang device_type(multicore) vector device_type(*) worker
136 end subroutine