[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / SemaOpenACC / parallel-loc-and-stmt.cpp
blob02ea2678f0361b91ce00a8a8a734bf358b085fbd
1 // RUN: %clang_cc1 %s -verify -fopenacc
3 // expected-error@+1{{OpenACC construct 'parallel' cannot be used here; it can only be used in a statement context}}
4 #pragma acc parallel
6 // expected-error@+1{{OpenACC construct 'parallel' cannot be used here; it can only be used in a statement context}}
7 #pragma acc parallel
8 int foo;
10 struct S {
11 // expected-error@+1{{OpenACC construct 'parallel' cannot be used here; it can only be used in a statement context}}
12 #pragma acc parallel
13 int foo;
15 void mem_func() {
16 // FIXME: Should we disallow this on declarations, or consider this to be on
17 // the initialization?
18 #pragma acc parallel
19 int foo;
21 #pragma acc parallel
25 #pragma acc parallel
26 while(0){}
28 #pragma acc parallel
29 for(;;){}
31 // expected-error@+2{{expected statement}}
32 #pragma acc parallel
37 template<typename T>
38 void func() {
39 // FIXME: Should we disallow this on declarations, and consider this to be on
40 // the initialization?
41 #pragma acc parallel
42 int foo;
44 #pragma acc parallel
48 #pragma acc parallel
49 while(0){}
51 #pragma acc parallel
52 for(;;){}
54 #pragma acc parallel
55 #pragma acc parallel
56 for(;;){}
58 // expected-error@+2{{expected statement}}
59 #pragma acc parallel