1 // RUN: %clang_cc1 -verify -fopenmp -o - %s
2 
3 void foo();
4 
5 int main(int argc, char **argv) {
6   #pragma omp target
7   #pragma omp teams default // expected-error {{expected '(' after 'default'}}
8   foo();
9   #pragma omp target
10   #pragma omp teams default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
11   foo();
12   #pragma omp target
13   #pragma omp teams default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
14   foo();
15   #pragma omp target
16   #pragma omp teams default (none // expected-error {{expected ')'}} expected-note {{to match this '('}}
17   foo();
18   #pragma omp target
19   #pragma omp teams default (shared), default(shared) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'default' clause}}
20   foo();
21   #pragma omp target
22   #pragma omp teams default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
23   foo();
24 
25   #pragma omp target
26   #pragma omp teams default(none)
27   ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
28 
29   #pragma omp target
30   #pragma omp teams default(none)
31   #pragma omp parallel default(shared)
32   ++argc;
33   return 0;
34 }
35