• 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 parallel sections proc_bind // expected-error {{expected '(' after 'proc_bind'}}
7   { foo(); }
8 #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 '('}}
9   { foo(); }
10 #pragma omp parallel sections proc_bind() // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
11   { foo(); }
12 #pragma omp parallel sections proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
13   { foo(); }
14 #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}}
15   { foo(); }
16 #pragma omp parallel sections proc_bind(x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
17   { foo(); }
18 
19 #pragma omp parallel sections proc_bind(master)
20   { ++argc; }
21 
22 #pragma omp parallel sections proc_bind(close)
23   {
24 #pragma omp parallel sections proc_bind(spread)
25     { ++argc; }
26   }
27   return 0;
28 }
29