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 9 #pragma omp teams default // expected-error {{expected '(' after 'default'}} 10 foo(); 11 #pragma omp target 12 #pragma omp teams default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} 13 foo(); 14 #pragma omp target 15 #pragma omp teams default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} 16 foo(); 17 #pragma omp target 18 #pragma omp teams default (none // expected-error {{expected ')'}} expected-note {{to match this '('}} 19 foo(); 20 #pragma omp target 21 #pragma omp teams default (shared), default(shared) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'default' clause}} 22 foo(); 23 #pragma omp target 24 #pragma omp teams default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} 25 foo(); 26 27 #pragma omp target 28 #pragma omp teams default(none) 29 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} 30 31 #pragma omp target 32 #pragma omp teams default(none) 33 #pragma omp parallel default(shared) 34 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} 35 return 0; 36 } 37