• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
2 
3 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
4 
5 void foo();
6 
main(int argc,char ** argv)7 int main(int argc, char **argv) {
8 #pragma omp parallel sections proc_bind // expected-error {{expected '(' after 'proc_bind'}}
9   { foo(); }
10 #pragma omp parallel sections proc_bind( // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
11   { foo(); }
12 #pragma omp parallel sections proc_bind() // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
13   { foo(); }
14 #pragma omp parallel sections proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
15   { foo(); }
16 #pragma omp parallel sections proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'proc_bind' clause}}
17   { foo(); }
18 #pragma omp parallel sections proc_bind(x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
19   { foo(); }
20 
21 #pragma omp parallel sections proc_bind(master)
22   { ++argc; }
23 
24 #pragma omp parallel sections proc_bind(close)
25   {
26 #pragma omp parallel sections proc_bind(spread)
27     { ++argc; }
28   }
29   return 0;
30 }
31