Debian Codegraph @

clang/test/SemaOpenACC/routine-construct-clauses.cpp

raw
1 // RUN: %clang_cc1 %s -fopenacc -verify
2
3 void Func();
4 void Func2();
5
6 #pragma acc routine(Func) worker
7 #pragma acc routine(Func) vector nohost
8 #pragma acc routine(Func) nohost seq
9 #pragma acc routine(Func) gang
10
11 // expected-error@+2{{OpenACC clause 'bind' cannot combine with previous 'bind' clause on a 'routine' directive}}
12 // expected-note@+1{{previous 'bind' clause is here}}
13 #pragma acc routine(Func) gang bind(a) bind(a)
14
15 // expected-error@+2{{OpenACC clause 'bind' cannot combine with previous 'bind' clause on a 'routine' directive}}
16 // expected-note@+1{{previous 'bind' clause is here}}
17 #pragma acc routine gang bind(a) bind(a)
18 void DupeImplName();
19
20 // Only 1 of worker, vector, seq, gang.
21 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'worker' clause on a 'routine' directive}}
22 // expected-note@+1{{previous 'worker' clause is here}}
23 #pragma acc routine(Func) worker vector
24 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'worker' clause on a 'routine' directive}}
25 // expected-note@+1{{previous 'worker' clause is here}}
26 #pragma acc routine(Func) worker seq
27 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'worker' clause on a 'routine' directive}}
28 // expected-note@+1{{previous 'worker' clause is here}}
29 #pragma acc routine(Func) worker gang
30 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'worker' clause on a 'routine' directive}}
31 // expected-note@+1{{previous 'worker' clause is here}}
32 #pragma acc routine(Func) worker worker
33 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'vector' clause on a 'routine' directive}}
34 // expected-note@+1{{previous 'vector' clause is here}}
35 #pragma acc routine(Func) vector worker
36 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'vector' clause on a 'routine' directive}}
37 // expected-note@+1{{previous 'vector' clause is here}}
38 #pragma acc routine(Func) vector seq
39 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'vector' clause on a 'routine' directive}}
40 // expected-note@+1{{previous 'vector' clause is here}}
41 #pragma acc routine(Func) vector gang
42 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'vector' clause on a 'routine' directive}}
43 // expected-note@+1{{previous 'vector' clause is here}}
44 #pragma acc routine(Func) vector vector
45 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'seq' clause on a 'routine' directive}}
46 // expected-note@+1{{previous 'seq' clause is here}}
47 #pragma acc routine(Func) seq worker
48 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'seq' clause on a 'routine' directive}}
49 // expected-note@+1{{previous 'seq' clause is here}}
50 #pragma acc routine(Func) seq vector
51 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'seq' clause on a 'routine' directive}}
52 // expected-note@+1{{previous 'seq' clause is here}}
53 #pragma acc routine(Func) seq gang
54 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'seq' clause on a 'routine' directive}}
55 // expected-note@+1{{previous 'seq' clause is here}}
56 #pragma acc routine(Func) seq seq
57 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'gang' clause on a 'routine' directive}}
58 // expected-note@+1{{previous 'gang' clause is here}}
59 #pragma acc routine(Func) gang worker
60 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'gang' clause on a 'routine' directive}}
61 // expected-note@+1{{previous 'gang' clause is here}}
62 #pragma acc routine(Func) gang vector
63 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'gang' clause on a 'routine' directive}}
64 // expected-note@+1{{previous 'gang' clause is here}}
65 #pragma acc routine(Func) gang seq
66 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'gang' clause on a 'routine' directive}}
67 // expected-note@+1{{previous 'gang' clause is here}}
68 #pragma acc routine(Func) gang gang
69 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}
70 #pragma acc routine(Func)
71 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}
72 #pragma acc routine(Func) nohost
73
74 // only the 'dim' syntax for gang is legal.
75 #pragma acc routine(Func) gang(dim:1)
76 // expected-error@+1{{'num' argument on 'gang' clause is not permitted on a 'routine' construct}}
77 #pragma acc routine(Func) gang(1)
78 // expected-error@+1{{'num' argument on 'gang' clause is not permitted on a 'routine' construct}}
79 #pragma acc routine(Func) gang(num:1)
80 // expected-error@+1{{'static' argument on 'gang' clause is not permitted on a 'routine' construct}}
81 #pragma acc routine(Func) gang(static:1)
82 // expected-error@+2{{OpenACC 'gang' clause may have at most one 'dim' argument}}
83 // expected-note@+1{{previous expression is here}}
84 #pragma acc routine(Func) gang(dim:1, dim:2)
85
86 // worker, vector, seq don't allow arguments.
87 // expected-error@+1{{'num' argument on 'worker' clause is not permitted on a 'routine' construct}}
88 #pragma acc routine(Func) worker(1)
89 // expected-error@+1{{'length' argument on 'vector' clause is not permitted on a 'routine' construct}}
90 #pragma acc routine(Func) vector(1)
91 // expected-error@+1{{expected identifier}}
92 #pragma acc routine(Func) seq(1)
93
94 int getSomeInt();
95 // dim must be a constant positive integer.
96 // expected-error@+1{{argument to 'gang' clause dimension must be a constant expression}}
97 #pragma acc routine(Func) gang(dim:getSomeInt())
98
99 struct HasFuncs {
100 static constexpr int Neg() { return -5; }
101 static constexpr int Zero() { return 0; }
102 static constexpr int One() { return 1; }
103 static constexpr int Two() { return 2; }
104 static constexpr int Three() { return 3; }
105 static constexpr int Four() { return 4; }
106 };
107 // 'dim' must be 1, 2, or 3.
108 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to -5}}
109 #pragma acc routine(Func) gang(dim:HasFuncs::Neg())
110 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 0}}
111 #pragma acc routine(Func) gang(dim:HasFuncs::Zero())
112 #pragma acc routine(Func) gang(dim:HasFuncs::One())
113 #pragma acc routine(Func) gang(dim:HasFuncs::Two())
114 #pragma acc routine(Func) gang(dim:HasFuncs::Three())
115 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}
116 #pragma acc routine(Func) gang(dim:HasFuncs::Four())
117
118 template<typename T>
119 struct DependentT {
120 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to -5}}
121 #pragma acc routine(Func) gang(dim:T::Neg())
122 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 0}}
123 #pragma acc routine(Func) gang(dim:T::Zero()) nohost
124 #pragma acc routine(Func) nohost gang(dim:T::One())
125 #pragma acc routine(Func) gang(dim:T::Two())
126 #pragma acc routine(Func) gang(dim:T::Three())
127 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}
128 #pragma acc routine(Func) gang(dim:T::Four())
129
130 void MemFunc();
131 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}
132 #pragma acc routine(MemFunc) gang(dim:T::Four())
133
134 // expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}
135 #pragma acc routine gang(dim:T::Four())
136 void MemFunc2();
137 };
138
139 void Inst() {
140 DependentT<HasFuncs> T;// expected-note{{in instantiation of}}
141 }
142
143 #pragma acc routine(Func) gang device_type(host)
144 #pragma acc routine(Func) gang dtype(multicore)
145 #pragma acc routine(Func) device_type(*) worker
146 #pragma acc routine(Func) dtype(*) worker
147
148 #pragma acc routine(Func) dtype(*) gang
149 #pragma acc routine(Func) device_type(*) worker
150 #pragma acc routine(Func) device_type(*) vector
151 #pragma acc routine(Func) dtype(*) seq
152 #pragma acc routine(Func2) seq device_type(*) bind("asdf")
153 void Func6();
154 #pragma acc routine(Func6) seq device_type(*) bind(WhateverElse)
155 #pragma acc routine(Func) seq dtype(*) device_type(*)
156 // expected-error@+2{{OpenACC clause 'nohost' may not follow a 'dtype' clause in a 'routine' construct}}
157 // expected-note@+1{{active 'dtype' clause here}}
158 #pragma acc routine(Func) seq dtype(*) nohost
159 // expected-error@+2{{OpenACC clause 'nohost' may not follow a 'device_type' clause in a 'routine' construct}}
160 // expected-note@+1{{active 'device_type' clause here}}
161 #pragma acc routine(Func) seq device_type(*) nohost
162
163 // 2.15: a bind clause may not bind to a routine name that has a visible bind clause.
164 void Func3();
165 #pragma acc routine(Func3) seq bind("asdf")
166 // OK: Doesn't have a bind
167 #pragma acc routine(Func3) seq
168 // expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
169 // expected-note@-4{{previous 'bind' clause is here}}
170 #pragma acc routine(Func3) seq bind("asdf")
171
172 void Func4();
173 // OK: Doesn't have a bind
174 #pragma acc routine(Func4) seq
175 #pragma acc routine(Func4) seq bind("asdf")
176 // expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
177 // expected-note@-2{{previous 'bind' clause is here}}
178 #pragma acc routine(Func4) seq bind("asdf")
179 void Func5();
180 #pragma acc routine(Func5) seq bind("asdf")
181 // expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
182 // expected-note@-2{{previous 'bind' clause is here}}
183 #pragma acc routine(Func5) seq bind("asdf")
184 // OK: Doesn't have a bind
185 #pragma acc routine(Func5) seq
186
187 // OK, same.
188 #pragma acc routine bind("asdf") seq
189 void DupeBinds1();
190 #pragma acc routine bind("asdf") seq
191 void DupeBinds1();
192
193 #pragma acc routine bind(asdf) seq
194 void DupeBinds2();
195 #pragma acc routine bind(asdf) seq
196 void DupeBinds2();
197
198 #pragma acc routine bind("asdf") seq
199 void DupeBinds3();
200 // expected-error@+2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}
201 // expected-note@-3{{previous 'bind' clause is here}}
202 #pragma acc routine bind(asdf) seq
203 void DupeBinds3();
204
205 void DupeBinds4();
206 #pragma acc routine(DupeBinds4) bind(asdf) seq
207 // expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
208 // expected-note@-2{{previous 'bind' clause is here}}
209 #pragma acc routine bind(asdf) seq
210 void DupeBinds4();
211
212 void DupeBinds4b();
213 // expected-error@+1{{expected function or lambda declaration for 'routine' construct}}
214 #pragma acc routine bind(asdf) seq
215 #pragma acc routine(DupeBinds4b) bind(asdf) seq
216 void DupeBinds4b();
217
218 #pragma acc routine bind(asdf) seq
219 void DupeBinds5();
220 // expected-error@+2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}
221 // expected-note@-3{{previous 'bind' clause is here}}
222 #pragma acc routine bind(asdfDiff) seq
223 void DupeBinds5();
224
225 #pragma acc routine bind("asdf") seq
226 void DupeBinds6();
227 // expected-error@+2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}
228 // expected-note@-3{{previous 'bind' clause is here}}
229 #pragma acc routine bind("asdfDiff") seq
230 void DupeBinds6();
231
232 // The standard wasn't initially clear, but is being clarified that we require
233 // exactly one of (gang, worker, vector, or seq) to apply to each 'device_type'.
234 // The ones before any 'device_type' apply to all.
235 namespace FigureDupesAllowedAroundDeviceType {
236 // Test conflicts without a device type
237 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'gang' clause on a 'routine' directive}}
238 // expected-note@+1{{previous 'gang' clause is here}}
239 #pragma acc routine gang gang
240 void Func1();
241 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'gang' clause on a 'routine' directive}}
242 // expected-note@+1{{previous 'gang' clause is here}}
243 #pragma acc routine gang worker
244 void Func2();
245 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'gang' clause on a 'routine' directive}}
246 // expected-note@+1{{previous 'gang' clause is here}}
247 #pragma acc routine gang vector
248 void Func3();
249 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'gang' clause on a 'routine' directive}}
250 // expected-note@+1{{previous 'gang' clause is here}}
251 #pragma acc routine gang seq
252 void Func4();
253 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'worker' clause on a 'routine' directive}}
254 // expected-note@+1{{previous 'worker' clause is here}}
255 #pragma acc routine worker gang
256 void Func5();
257 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'worker' clause on a 'routine' directive}}
258 // expected-note@+1{{previous 'worker' clause is here}}
259 #pragma acc routine worker worker
260 void Func6();
261 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'worker' clause on a 'routine' directive}}
262 // expected-note@+1{{previous 'worker' clause is here}}
263 #pragma acc routine worker vector
264 void Func7();
265 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'worker' clause on a 'routine' directive}}
266 // expected-note@+1{{previous 'worker' clause is here}}
267 #pragma acc routine worker seq
268 void Func8();
269 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'vector' clause on a 'routine' directive}}
270 // expected-note@+1{{previous 'vector' clause is here}}
271 #pragma acc routine vector gang
272 void Func9();
273 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'vector' clause on a 'routine' directive}}
274 // expected-note@+1{{previous 'vector' clause is here}}
275 #pragma acc routine vector worker
276 void Func10();
277 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'vector' clause on a 'routine' directive}}
278 // expected-note@+1{{previous 'vector' clause is here}}
279 #pragma acc routine vector vector
280 void Func11();
281 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'vector' clause on a 'routine' directive}}
282 // expected-note@+1{{previous 'vector' clause is here}}
283 #pragma acc routine vector seq
284 void Func12();
285 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'seq' clause on a 'routine' directive}}
286 // expected-note@+1{{previous 'seq' clause is here}}
287 #pragma acc routine seq gang
288 void Func13();
289 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'seq' clause on a 'routine' directive}}
290 // expected-note@+1{{previous 'seq' clause is here}}
291 #pragma acc routine seq worker
292 void Func14();
293 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'seq' clause on a 'routine' directive}}
294 // expected-note@+1{{previous 'seq' clause is here}}
295 #pragma acc routine seq vector
296 void Func15();
297 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'seq' clause on a 'routine' directive}}
298 // expected-note@+1{{previous 'seq' clause is here}}
299 #pragma acc routine seq seq
300 void Func16();
301 // None included for one without a device type
302 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}
303 #pragma acc routine
304 void Func16();
305
306 // Check same conflicts for 'before' the device_type
307 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'gang' clause on a 'routine' directive}}
308 // expected-note@+1{{previous 'gang' clause is here}}
309 #pragma acc routine gang gang device_type(*)
310 void Func17();
311 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'gang' clause on a 'routine' directive}}
312 // expected-note@+1{{previous 'gang' clause is here}}
313 #pragma acc routine gang worker device_type(*)
314 void Func18();
315 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'gang' clause on a 'routine' directive}}
316 // expected-note@+1{{previous 'gang' clause is here}}
317 #pragma acc routine gang vector device_type(*)
318 void Func19();
319 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'gang' clause on a 'routine' directive}}
320 // expected-note@+1{{previous 'gang' clause is here}}
321 #pragma acc routine gang seq device_type(*)
322 void Func20();
323 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'worker' clause on a 'routine' directive}}
324 // expected-note@+1{{previous 'worker' clause is here}}
325 #pragma acc routine worker gang device_type(*)
326 void Func21();
327 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'worker' clause on a 'routine' directive}}
328 // expected-note@+1{{previous 'worker' clause is here}}
329 #pragma acc routine worker worker device_type(*)
330 void Func22();
331 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'worker' clause on a 'routine' directive}}
332 // expected-note@+1{{previous 'worker' clause is here}}
333 #pragma acc routine worker vector device_type(*)
334 void Func23();
335 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'worker' clause on a 'routine' directive}}
336 // expected-note@+1{{previous 'worker' clause is here}}
337 #pragma acc routine worker seq device_type(*)
338 void Func24();
339 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'vector' clause on a 'routine' directive}}
340 // expected-note@+1{{previous 'vector' clause is here}}
341 #pragma acc routine vector gang device_type(*)
342 void Func25();
343 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'vector' clause on a 'routine' directive}}
344 // expected-note@+1{{previous 'vector' clause is here}}
345 #pragma acc routine vector worker device_type(*)
346 void Func26();
347 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'vector' clause on a 'routine' directive}}
348 // expected-note@+1{{previous 'vector' clause is here}}
349 #pragma acc routine vector vector device_type(*)
350 void Func27();
351 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'vector' clause on a 'routine' directive}}
352 // expected-note@+1{{previous 'vector' clause is here}}
353 #pragma acc routine vector seq device_type(*)
354 void Func28();
355 // expected-error@+2{{OpenACC clause 'gang' cannot combine with previous 'seq' clause on a 'routine' directive}}
356 // expected-note@+1{{previous 'seq' clause is here}}
357 #pragma acc routine seq gang device_type(*)
358 void Func29();
359 // expected-error@+2{{OpenACC clause 'worker' cannot combine with previous 'seq' clause on a 'routine' directive}}
360 // expected-note@+1{{previous 'seq' clause is here}}
361 #pragma acc routine seq worker device_type(*)
362 void Func30();
363 // expected-error@+2{{OpenACC clause 'vector' cannot combine with previous 'seq' clause on a 'routine' directive}}
364 // expected-note@+1{{previous 'seq' clause is here}}
365 #pragma acc routine seq vector device_type(*)
366 void Func31();
367 // expected-error@+2{{OpenACC clause 'seq' cannot combine with previous 'seq' clause on a 'routine' directive}}
368 // expected-note@+1{{previous 'seq' clause is here}}
369 #pragma acc routine seq seq device_type(*)
370 void Func32();
371 // None included for the device_type
372 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause that applies to each 'device_type'}}
373 #pragma acc routine device_type(*)
374 void Func33();
375
376 // Conflicts between 'global' and 'device_type'
377 // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' construct conflicts with the 'gang' clause before the first 'device_type'}}
378 // expected-note@+2{{previous 'gang' clause is here}}
379 // expected-note@+1{{active 'device_type' clause here}}
380 #pragma acc routine gang device_type(*) gang
381 void Func34();
382 // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' construct conflicts with the 'gang' clause before the first 'device_type'}}
383 // expected-note@+2{{previous 'gang' clause is here}}
384 // expected-note@+1{{active 'device_type' clause here}}
385 #pragma acc routine gang device_type(*) worker
386 void Func35();
387 // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' construct conflicts with the 'gang' clause before the first 'device_type'}}
388 // expected-note@+2{{previous 'gang' clause is here}}
389 // expected-note@+1{{active 'device_type' clause here}}
390 #pragma acc routine gang device_type(*) vector
391 void Func36();
392 // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' construct conflicts with the 'gang' clause before the first 'device_type'}}
393 // expected-note@+2{{previous 'gang' clause is here}}
394 // expected-note@+1{{active 'device_type' clause here}}
395 #pragma acc routine gang device_type(*) seq
396 void Func37();
397 // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' construct conflicts with the 'worker' clause before the first 'device_type'}}
398 // expected-note@+2{{previous 'worker' clause is here}}
399 // expected-note@+1{{active 'device_type' clause here}}
400 #pragma acc routine worker device_type(*) gang
401 void Func38();
402 // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' construct conflicts with the 'worker' clause before the first 'device_type'}}
403 // expected-note@+2{{previous 'worker' clause is here}}
404 // expected-note@+1{{active 'device_type' clause here}}
405 #pragma acc routine worker device_type(*) worker
406 void Func39();
407 // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' construct conflicts with the 'worker' clause before the first 'device_type'}}
408 // expected-note@+2{{previous 'worker' clause is here}}
409 // expected-note@+1{{active 'device_type' clause here}}
410 #pragma acc routine worker device_type(*) vector
411 void Func40();
412 // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' construct conflicts with the 'worker' clause before the first 'device_type'}}
413 // expected-note@+2{{previous 'worker' clause is here}}
414 // expected-note@+1{{active 'device_type' clause here}}
415 #pragma acc routine worker device_type(*) seq
416 void Func41();
417 // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' construct conflicts with the 'vector' clause before the first 'device_type'}}
418 // expected-note@+2{{previous 'vector' clause is here}}
419 // expected-note@+1{{active 'device_type' clause here}}
420 #pragma acc routine vector device_type(*) gang
421 void Func42();
422 // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' construct conflicts with the 'vector' clause before the first 'device_type'}}
423 // expected-note@+2{{previous 'vector' clause is here}}
424 // expected-note@+1{{active 'device_type' clause here}}
425 #pragma acc routine vector device_type(*) worker
426 void Func43();
427 // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' construct conflicts with the 'vector' clause before the first 'device_type'}}
428 // expected-note@+2{{previous 'vector' clause is here}}
429 // expected-note@+1{{active 'device_type' clause here}}
430 #pragma acc routine vector device_type(*) vector
431 void Func44();
432 // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' construct conflicts with the 'vector' clause before the first 'device_type'}}
433 // expected-note@+2{{previous 'vector' clause is here}}
434 // expected-note@+1{{active 'device_type' clause here}}
435 #pragma acc routine vector device_type(*) seq
436 void Func45();
437 // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' construct conflicts with the 'seq' clause before the first 'device_type'}}
438 // expected-note@+2{{previous 'seq' clause is here}}
439 // expected-note@+1{{active 'device_type' clause here}}
440 #pragma acc routine seq device_type(*) gang
441 void Func46();
442 // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' construct conflicts with the 'seq' clause before the first 'device_type'}}
443 // expected-note@+2{{previous 'seq' clause is here}}
444 // expected-note@+1{{active 'device_type' clause here}}
445 #pragma acc routine seq device_type(*) worker
446 void Func47();
447 // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' construct conflicts with the 'seq' clause before the first 'device_type'}}
448 // expected-note@+2{{previous 'seq' clause is here}}
449 // expected-note@+1{{active 'device_type' clause here}}
450 #pragma acc routine seq device_type(*) vector
451 void Func48();
452 // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' construct conflicts with the 'seq' clause before the first 'device_type'}}
453 // expected-note@+2{{previous 'seq' clause is here}}
454 // expected-note@+1{{active 'device_type' clause here}}
455 #pragma acc routine seq device_type(*) seq
456 void Func49();
457
458 // Conflicts within same device_type
459 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
460 // expected-note@+2{{previous 'gang' clause is here}}
461 // expected-note@+1{{active 'device_type' clause here}}
462 #pragma acc routine device_type(*) gang gang
463 void Func50();
464 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
465 // expected-note@+2{{previous 'gang' clause is here}}
466 // expected-note@+1{{active 'device_type' clause here}}
467 #pragma acc routine device_type(*) gang worker
468 void Func51();
469 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
470 // expected-note@+2{{previous 'gang' clause is here}}
471 // expected-note@+1{{active 'device_type' clause here}}
472 #pragma acc routine device_type(*) gang vector
473 void Func52();
474 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
475 // expected-note@+2{{previous 'gang' clause is here}}
476 // expected-note@+1{{active 'device_type' clause here}}
477 #pragma acc routine device_type(*) gang seq
478 void Func53();
479 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
480 // expected-note@+2{{previous 'worker' clause is here}}
481 // expected-note@+1{{active 'device_type' clause here}}
482 #pragma acc routine device_type(*) worker gang
483 void Func54();
484 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
485 // expected-note@+2{{previous 'worker' clause is here}}
486 // expected-note@+1{{active 'device_type' clause here}}
487 #pragma acc routine device_type(*) worker worker
488 void Func55();
489 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
490 // expected-note@+2{{previous 'worker' clause is here}}
491 // expected-note@+1{{active 'device_type' clause here}}
492 #pragma acc routine device_type(*) worker vector
493 void Func56();
494 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
495 // expected-note@+2{{previous 'worker' clause is here}}
496 // expected-note@+1{{active 'device_type' clause here}}
497 #pragma acc routine device_type(*) worker seq
498 void Func57();
499 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
500 // expected-note@+2{{previous 'vector' clause is here}}
501 // expected-note@+1{{active 'device_type' clause here}}
502 #pragma acc routine device_type(*) vector gang
503 void Func58();
504 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
505 // expected-note@+2{{previous 'vector' clause is here}}
506 // expected-note@+1{{active 'device_type' clause here}}
507 #pragma acc routine device_type(*) vector worker
508 void Func59();
509 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
510 // expected-note@+2{{previous 'vector' clause is here}}
511 // expected-note@+1{{active 'device_type' clause here}}
512 #pragma acc routine device_type(*) vector vector
513 void Func60();
514 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
515 // expected-note@+2{{previous 'vector' clause is here}}
516 // expected-note@+1{{active 'device_type' clause here}}
517 #pragma acc routine device_type(*) vector seq
518 void Func61();
519 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
520 // expected-note@+2{{previous 'seq' clause is here}}
521 // expected-note@+1{{active 'device_type' clause here}}
522 #pragma acc routine device_type(*) seq gang
523 void Func62();
524 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
525 // expected-note@+2{{previous 'seq' clause is here}}
526 // expected-note@+1{{active 'device_type' clause here}}
527 #pragma acc routine device_type(*) seq worker
528 void Func63();
529 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
530 // expected-note@+2{{previous 'seq' clause is here}}
531 // expected-note@+1{{active 'device_type' clause here}}
532 #pragma acc routine device_type(*) seq vector
533 void Func64();
534 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
535 // expected-note@+2{{previous 'seq' clause is here}}
536 // expected-note@+1{{active 'device_type' clause here}}
537 #pragma acc routine device_type(*) seq seq
538 void Func65();
539
540 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
541 // expected-note@+2{{previous 'gang' clause is here}}
542 // expected-note@+1{{active 'device_type' clause here}}
543 #pragma acc routine device_type(*) gang gang device_type(nvidia) seq
544 void Func66();
545 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
546 // expected-note@+2{{previous 'gang' clause is here}}
547 // expected-note@+1{{active 'device_type' clause here}}
548 #pragma acc routine device_type(*) gang worker device_type(nvidia) seq
549 void Func67();
550 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
551 // expected-note@+2{{previous 'gang' clause is here}}
552 // expected-note@+1{{active 'device_type' clause here}}
553 #pragma acc routine device_type(*) gang vector device_type(nvidia) seq
554 void Func68();
555 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
556 // expected-note@+2{{previous 'gang' clause is here}}
557 // expected-note@+1{{active 'device_type' clause here}}
558 #pragma acc routine device_type(*) gang seq device_type(nvidia) seq
559 void Func69();
560 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
561 // expected-note@+2{{previous 'worker' clause is here}}
562 // expected-note@+1{{active 'device_type' clause here}}
563 #pragma acc routine device_type(*) worker gang device_type(nvidia) seq
564 void Func70();
565 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
566 // expected-note@+2{{previous 'worker' clause is here}}
567 // expected-note@+1{{active 'device_type' clause here}}
568 #pragma acc routine device_type(*) worker worker device_type(nvidia) seq
569 void Func71();
570 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
571 // expected-note@+2{{previous 'worker' clause is here}}
572 // expected-note@+1{{active 'device_type' clause here}}
573 #pragma acc routine device_type(*) worker vector device_type(nvidia) seq
574 void Func72();
575 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
576 // expected-note@+2{{previous 'worker' clause is here}}
577 // expected-note@+1{{active 'device_type' clause here}}
578 #pragma acc routine device_type(*) worker seq device_type(nvidia) seq
579 void Func73();
580 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
581 // expected-note@+2{{previous 'vector' clause is here}}
582 // expected-note@+1{{active 'device_type' clause here}}
583 #pragma acc routine device_type(*) vector gang device_type(nvidia) seq
584 void Func74();
585 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
586 // expected-note@+2{{previous 'vector' clause is here}}
587 // expected-note@+1{{active 'device_type' clause here}}
588 #pragma acc routine device_type(*) vector worker device_type(nvidia) seq
589 void Func75();
590 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
591 // expected-note@+2{{previous 'vector' clause is here}}
592 // expected-note@+1{{active 'device_type' clause here}}
593 #pragma acc routine device_type(*) vector vector device_type(nvidia) seq
594 void Func76();
595 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
596 // expected-note@+2{{previous 'vector' clause is here}}
597 // expected-note@+1{{active 'device_type' clause here}}
598 #pragma acc routine device_type(*) vector seq device_type(nvidia) seq
599 void Func77();
600 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
601 // expected-note@+2{{previous 'seq' clause is here}}
602 // expected-note@+1{{active 'device_type' clause here}}
603 #pragma acc routine device_type(*) seq gang device_type(nvidia) seq
604 void Func78();
605 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
606 // expected-note@+2{{previous 'seq' clause is here}}
607 // expected-note@+1{{active 'device_type' clause here}}
608 #pragma acc routine device_type(*) seq worker device_type(nvidia) seq
609 void Func79();
610 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
611 // expected-note@+2{{previous 'seq' clause is here}}
612 // expected-note@+1{{active 'device_type' clause here}}
613 #pragma acc routine device_type(*) seq vector device_type(nvidia) seq
614 void Func80();
615 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
616 // expected-note@+2{{previous 'seq' clause is here}}
617 // expected-note@+1{{active 'device_type' clause here}}
618 #pragma acc routine device_type(*) seq seq device_type(nvidia) seq
619 void Func81();
620
621 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
622 // expected-note@+2{{previous 'gang' clause is here}}
623 // expected-note@+1{{active 'device_type' clause here}}
624 #pragma acc routine device_type(nvidia) seq device_type(*) gang gang
625 void Func82();
626 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
627 // expected-note@+2{{previous 'gang' clause is here}}
628 // expected-note@+1{{active 'device_type' clause here}}
629 #pragma acc routine device_type(nvidia) seq device_type(*) gang worker
630 void Func83();
631 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
632 // expected-note@+2{{previous 'gang' clause is here}}
633 // expected-note@+1{{active 'device_type' clause here}}
634 #pragma acc routine device_type(nvidia) seq device_type(*) gang vector
635 void Func84();
636 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'gang' clause in the same 'device_type' region on a 'routine' directive}}
637 // expected-note@+2{{previous 'gang' clause is here}}
638 // expected-note@+1{{active 'device_type' clause here}}
639 #pragma acc routine device_type(nvidia) seq device_type(*) gang seq
640 void Func85();
641 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
642 // expected-note@+2{{previous 'worker' clause is here}}
643 // expected-note@+1{{active 'device_type' clause here}}
644 #pragma acc routine device_type(nvidia) seq device_type(*) worker gang
645 void Func86();
646 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
647 // expected-note@+2{{previous 'worker' clause is here}}
648 // expected-note@+1{{active 'device_type' clause here}}
649 #pragma acc routine device_type(nvidia) seq device_type(*) worker worker
650 void Func87();
651 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
652 // expected-note@+2{{previous 'worker' clause is here}}
653 // expected-note@+1{{active 'device_type' clause here}}
654 #pragma acc routine device_type(nvidia) seq device_type(*) worker vector
655 void Func88();
656 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'worker' clause in the same 'device_type' region on a 'routine' directive}}
657 // expected-note@+2{{previous 'worker' clause is here}}
658 // expected-note@+1{{active 'device_type' clause here}}
659 #pragma acc routine device_type(nvidia) seq device_type(*) worker seq
660 void Func89();
661 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
662 // expected-note@+2{{previous 'vector' clause is here}}
663 // expected-note@+1{{active 'device_type' clause here}}
664 #pragma acc routine device_type(nvidia) seq device_type(*) vector gang
665 void Func90();
666 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
667 // expected-note@+2{{previous 'vector' clause is here}}
668 // expected-note@+1{{active 'device_type' clause here}}
669 #pragma acc routine device_type(nvidia) seq device_type(*) vector worker
670 void Func91();
671 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
672 // expected-note@+2{{previous 'vector' clause is here}}
673 // expected-note@+1{{active 'device_type' clause here}}
674 #pragma acc routine device_type(nvidia) seq device_type(*) vector vector
675 void Func92();
676 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'vector' clause in the same 'device_type' region on a 'routine' directive}}
677 // expected-note@+2{{previous 'vector' clause is here}}
678 // expected-note@+1{{active 'device_type' clause here}}
679 #pragma acc routine device_type(nvidia) seq device_type(*) vector seq
680 void Func93();
681 // expected-error@+3{{OpenACC clause 'gang' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
682 // expected-note@+2{{previous 'seq' clause is here}}
683 // expected-note@+1{{active 'device_type' clause here}}
684 #pragma acc routine device_type(nvidia) seq device_type(*) seq gang
685 void Func94();
686 // expected-error@+3{{OpenACC clause 'worker' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
687 // expected-note@+2{{previous 'seq' clause is here}}
688 // expected-note@+1{{active 'device_type' clause here}}
689 #pragma acc routine device_type(nvidia) seq device_type(*) seq worker
690 void Func95();
691 // expected-error@+3{{OpenACC clause 'vector' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
692 // expected-note@+2{{previous 'seq' clause is here}}
693 // expected-note@+1{{active 'device_type' clause here}}
694 #pragma acc routine device_type(nvidia) seq device_type(*) seq vector
695 void Func96();
696 // expected-error@+3{{OpenACC clause 'seq' cannot combine with previous 'seq' clause in the same 'device_type' region on a 'routine' directive}}
697 // expected-note@+2{{previous 'seq' clause is here}}
698 // expected-note@+1{{active 'device_type' clause here}}
699 #pragma acc routine device_type(nvidia) seq device_type(*) seq seq
700 void Func97();
701
702 // All fine?
703 #pragma acc routine device_type(*) gang device_type(nvidia) gang
704 void Func98();
705 #pragma acc routine device_type(*) gang device_type(nvidia) worker
706 void Func99();
707 #pragma acc routine device_type(*) gang device_type(nvidia) vector
708 void Func100();
709 #pragma acc routine device_type(*) gang device_type(nvidia) seq
710 void Func101();
711 #pragma acc routine device_type(*) worker device_type(nvidia) gang
712 void Func102();
713 #pragma acc routine device_type(*) worker device_type(nvidia) worker
714 void Func103();
715 #pragma acc routine device_type(*) worker device_type(nvidia) vector
716 void Func104();
717 #pragma acc routine device_type(*) worker device_type(nvidia) seq
718 void Func105();
719 #pragma acc routine device_type(*) vector device_type(nvidia) gang
720 void Func106();
721 #pragma acc routine device_type(*) vector device_type(nvidia) worker
722 void Func107();
723 #pragma acc routine device_type(*) vector device_type(nvidia) vector
724 void Func108();
725 #pragma acc routine device_type(*) vector device_type(nvidia) seq
726 void Func109();
727 #pragma acc routine device_type(*) seq device_type(nvidia) gang
728 void Func110();
729 #pragma acc routine device_type(*) seq device_type(nvidia) worker
730 void Func111();
731 #pragma acc routine device_type(*) seq device_type(nvidia) vector
732 void Func112();
733 #pragma acc routine device_type(*) seq device_type(nvidia) seq
734 void Func113();
735
736 }
737
738 namespace BindDupes {
739 // expected-error@+2{{OpenACC clause 'bind' cannot combine with previous 'bind' clause on a 'routine' directive}}
740 // expected-note@+1{{previous 'bind' clause is here}}
741 #pragma acc routine seq bind(asdf) bind(asdf)
742 void Func1();
743 // expected-error@+2{{OpenACC clause 'bind' cannot combine with previous 'bind' clause on a 'routine' directive}}
744 // expected-note@+1{{previous 'bind' clause is here}}
745 #pragma acc routine seq bind(asdf) bind(asdf) device_type(*)
746 void Func2();
747 // expected-error@+3{{OpenACC clause 'bind' after 'device_type' clause on a 'routine' construct conflicts with the 'bind' clause before the first 'device_type'}}
748 // expected-note@+2{{previous 'bind' clause is here}}
749 // expected-note@+1{{active 'device_type' clause here}}
750 #pragma acc routine seq bind(asdf) device_type(*) bind(asdf)
751 void Func3();
752 // expected-error@+3{{OpenACC clause 'bind' after 'device_type' clause on a 'routine' construct conflicts with the 'bind' clause before the first 'device_type'}}
753 // expected-note@+2{{previous 'bind' clause is here}}
754 // expected-note@+1{{active 'device_type' clause here}}
755 #pragma acc routine seq bind(asdf) device_type(*) bind(asdf) device_type(*)
756 void Func4();
757 // expected-error@+3{{OpenACC clause 'bind' cannot combine with previous 'bind' clause in the same 'device_type' region on a 'routine' directive}}
758 // expected-note@+2{{previous 'bind' clause is here}}
759 // expected-note@+1{{active 'device_type' clause here}}
760 #pragma acc routine seq device_type(*) bind(asdf) bind(asdf)
761 void Func5();
762 // expected-error@+3{{OpenACC clause 'bind' cannot combine with previous 'bind' clause in the same 'device_type' region on a 'routine' directive}}
763 // expected-note@+2{{previous 'bind' clause is here}}
764 // expected-note@+1{{active 'device_type' clause here}}
765 #pragma acc routine seq device_type(*) bind(asdf) bind(asdf) device_type(*)
766
767 void Func6();
768 // expected-error@+8{{OpenACC 'bind' clause applies to 'device_type' '*', which conflicts with previous 'bind' clause}}
769 // expected-note@+7{{previous 'bind' clause is here}}
770 // expected-note@+6{{active 'device_type' clause here}}
771 // expected-note@+5{{which applies to 'device_type' clause here}}
772 // expected-error@+4{{OpenACC 'bind' clause applies to 'device_type' '*', which conflicts with previous 'bind' clause}}
773 // expected-note@+3{{previous 'bind' clause is here}}
774 // expected-note@+2{{active 'device_type' clause here}}
775 // expected-note@+1{{which applies to 'device_type' clause here}}
776 #pragma acc routine seq device_type(*) bind(asdf) device_type(*) bind(asdf) bind(asdf)
777 void Func7();
778
779 // expected-error@+4{{OpenACC 'bind' clause applies to 'device_type' '*', which conflicts with previous 'bind' clause}}
780 // expected-note@+3{{active 'device_type' clause here}}
781 // expected-note@+2{{previous 'bind' clause is here}}
782 // expected-note@+1{{which applies to 'device_type' clause here}}
783 #pragma acc routine seq device_type(*) bind(asdf) device_type(*) bind(asdf)
784 void Func8();
785 }
786
787 namespace OtherDupes {
788 // expected-error@+5{{OpenACC 'seq' clause applies to 'device_type' 'nvidia', which conflicts with previous 'worker' clause}}
789 // expected-note@+4{{active 'device_type' clause here}}
790 // expected-note@+3{{previous 'worker' clause is here}}
791 // expected-note@+2{{which applies to 'device_type' clause here}}
792 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause that applies to each 'device_type'}}
793 #pragma acc routine device_type(nvidia) worker device_type(nvidia) seq
794 void Func1();
795 // expected-error@+5{{OpenACC 'gang' clause applies to 'device_type' 'acc_device_nvidia', which conflicts with previous 'vector' clause}}
796 // expected-note@+4{{active 'device_type' clause here}}
797 // expected-note@+3{{previous 'vector' clause is here}}
798 // expected-note@+2{{which applies to 'device_type' clause here}}
799 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause that applies to each 'device_type'}}
800 #pragma acc routine device_type(nvidia) vector device_type(acc_device_nvidia) gang
801 void Func2();
802 // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause that applies to each 'device_type'}}
803 #pragma acc routine device_type(nvidia) vector device_type(acc_device_nvidia)
804 void Func3();
805 }