xref: /llvm-project/flang/test/Semantics/OpenACC/acc-routine.f90 (revision 238b5790ba2027a88706a320fe61bd21601b788b)
145c97af5SValentin Clement! RUN: %python %S/../test_errors.py %s %flang -fopenacc
245c97af5SValentin Clement
345c97af5SValentin Clementsubroutine sub1(a)
445c97af5SValentin Clement real, dimension(10) :: a
545c97af5SValentin Clementend subroutine
645c97af5SValentin Clement
745c97af5SValentin Clementsubroutine sub2(a)
845c97af5SValentin Clement  !$acc routine(sub1) gang(dim:1)
945c97af5SValentin Clement  real, dimension(10) :: a
1045c97af5SValentin Clement  call sub1(a)
1145c97af5SValentin Clementend subroutine
12e2f68915SValentin Clement
13e2f68915SValentin Clementsubroutine sub3()
14e2f68915SValentin Clement  !$acc routine bind(sub1)
15e2f68915SValentin Clementend subroutine
16bdfe5d69SValentin Clement (バレンタイン クレメン)
17*238b5790SValentin Clement (バレンタイン クレメン)subroutine sub4()
18*238b5790SValentin Clement (バレンタイン クレメン)  !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive
19*238b5790SValentin Clement (バレンタイン クレメン)  !$acc routine gang(num: 1)
20*238b5790SValentin Clement (バレンタイン クレメン)end subroutine
21*238b5790SValentin Clement (バレンタイン クレメン)
22*238b5790SValentin Clement (バレンタイン クレメン)subroutine sub5()
23*238b5790SValentin Clement (バレンタイン クレメン)  !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive
24*238b5790SValentin Clement (バレンタイン クレメン)  !$acc routine gang(static: 1)
25*238b5790SValentin Clement (バレンタイン クレメン)end subroutine
26*238b5790SValentin Clement (バレンタイン クレメン)
27bdfe5d69SValentin Clement (バレンタイン クレメン)subroutine sub6()
28bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive
29bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang gang
30bdfe5d69SValentin Clement (バレンタイン クレメン)
31bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive
32bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker gang
33bdfe5d69SValentin Clement (バレンタイン クレメン)
34bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive
35bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector gang
36bdfe5d69SValentin Clement (バレンタイン クレメン)
37bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive
38bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq gang
39bdfe5d69SValentin Clement (バレンタイン クレメン)
40bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive
41bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker worker
42bdfe5d69SValentin Clement (バレンタイン クレメン)
43bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
44bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang worker
45bdfe5d69SValentin Clement (バレンタイン クレメン)
46bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause VECTOR appears on the ROUTINE directive
47bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector worker
48bdfe5d69SValentin Clement (バレンタイン クレメン)
49bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive
50bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq worker
51bdfe5d69SValentin Clement (バレンタイン クレメン)
52bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
53bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector vector
54bdfe5d69SValentin Clement (バレンタイン クレメン)
55bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive
56bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang vector
57bdfe5d69SValentin Clement (バレンタイン クレメン)
58bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive
59bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker vector
60bdfe5d69SValentin Clement (バレンタイン クレメン)
61bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive
62bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq vector
63bdfe5d69SValentin Clement (バレンタイン クレメン)
64bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive
65bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq seq
66bdfe5d69SValentin Clement (バレンタイン クレメン)
67bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
68bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang seq
69bdfe5d69SValentin Clement (バレンタイン クレメン)
70bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive
71bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker seq
72bdfe5d69SValentin Clement (バレンタイン クレメン)
73bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive
74bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector seq
75bdfe5d69SValentin Clement (バレンタイン クレメン)
76bdfe5d69SValentin Clement (バレンタイン クレメン)end subroutine
77bdfe5d69SValentin Clement (バレンタイン クレメン)
78bdfe5d69SValentin Clement (バレンタイン クレメン)subroutine sub7()
79bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine device_type(*) gang device_type(host) worker
80bdfe5d69SValentin Clement (バレンタイン クレメン)
81bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
82bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine device_type(*) gang seq
83bdfe5d69SValentin Clement (バレンタイン クレメン)
84bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
85bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine device_type(*) gang worker
86bdfe5d69SValentin Clement (バレンタイン クレメン)
87bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive
88bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang device_type(*) gang
89bdfe5d69SValentin Clement (バレンタイン クレメン)
90bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
91bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang device_type(*) worker
92bdfe5d69SValentin Clement (バレンタイン クレメン)
93bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive
94bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang device_type(*) vector
95bdfe5d69SValentin Clement (バレンタイン クレメン)
96bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
97bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine gang device_type(*) seq
98bdfe5d69SValentin Clement (バレンタイン クレメン)
99bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive
100bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker device_type(*) worker
101bdfe5d69SValentin Clement (バレンタイン クレメン)
102bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive
103bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker device_type(*) gang
104bdfe5d69SValentin Clement (バレンタイン クレメン)
105bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive
106bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker device_type(*) vector
107bdfe5d69SValentin Clement (バレンタイン クレメン)
108bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive
109bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine worker device_type(*) seq
110bdfe5d69SValentin Clement (バレンタイン クレメン)
111bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
112bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector device_type(*) vector
113bdfe5d69SValentin Clement (バレンタイン クレメン)
114bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive
115bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector device_type(*) gang
116bdfe5d69SValentin Clement (バレンタイン クレメン)
117bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
118bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector device_type(*) vector
119bdfe5d69SValentin Clement (バレンタイン クレメン)
120bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive
121bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine vector device_type(*) seq
122bdfe5d69SValentin Clement (バレンタイン クレメン)
123bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive
124bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq device_type(*) seq
125bdfe5d69SValentin Clement (バレンタイン クレメン)
126bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive
127bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq device_type(*) gang
128bdfe5d69SValentin Clement (バレンタイン クレメン)
129bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive
130bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq device_type(*) vector
131bdfe5d69SValentin Clement (バレンタイン クレメン)
132bdfe5d69SValentin Clement (バレンタイン クレメン)  !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive
133bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine seq device_type(*) worker
134bdfe5d69SValentin Clement (バレンタイン クレメン)
135bdfe5d69SValentin Clement (バレンタイン クレメン)  !$acc routine device_type(host) seq device_type(nvidia) gang device_type(multicore) vector device_type(*) worker
136bdfe5d69SValentin Clement (バレンタイン クレメン)end subroutine
137