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