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