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