• 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   int i;
7 #pragma omp target parallel for proc_bind // expected-error {{expected '(' after 'proc_bind'}}
8   for (i = 0; i < argc; ++i)
9     foo();
10 #pragma omp target parallel for proc_bind( // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
11   for (i = 0; i < argc; ++i)
12     foo();
13 #pragma omp target parallel for proc_bind() // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
14   for (i = 0; i < argc; ++i)
15     foo();
16 #pragma omp target parallel for proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
17   for (i = 0; i < argc; ++i)
18     foo();
19 #pragma omp target parallel for proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'proc_bind' clause}}
20   for (i = 0; i < argc; ++i)
21     foo();
22 #pragma omp target parallel for proc_bind(x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
23   for (i = 0; i < argc; ++i)
24     foo();
25 
26 #pragma omp target parallel for proc_bind(master)
27   for (i = 0; i < argc; ++i)
28     foo();
29 
30 #pragma omp parallel proc_bind(close)
31 #pragma omp target parallel for proc_bind(spread)
32   for (i = 0; i < argc; ++i)
33     foo();
34   return 0;
35 }
36