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