1 // RUN: %clang_cc1 -verify=expected,omp51 -fopenmp %s -Wuninitialized
3 // RUN: %clang_cc1 -verify=expected,omp51 -fopenmp-simd %s -Wuninitialized
5 // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp -fopenmp-version=50 %s -Wuninitialized
7 // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -fopenmp-version=50 %s -Wuninitialized
11 template <class T
, typename S
, int N
>
12 T
tmain(T argc
, S
**argv
) {
15 #pragma omp teams distribute parallel for proc_bind // expected-error {{expected '(' after 'proc_bind'}}
16 for (i
= 0; i
< argc
; ++i
)
19 #pragma omp teams distribute parallel for proc_bind( // omp50-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} omp51-error {{expected 'master', 'close', 'spread' or 'primary' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
20 for (i
= 0; i
< argc
; ++i
)
23 #pragma omp teams distribute parallel for proc_bind() // omp50-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} omp51-error {{expected 'master', 'close', 'spread' or 'primary' in OpenMP clause 'proc_bind'}}
24 for (i
= 0; i
< argc
; ++i
)
27 #pragma omp teams distribute parallel for proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
28 for (i
= 0; i
< argc
; ++i
)
31 #pragma omp teams distribute parallel for proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'proc_bind' clause}}
32 for (i
= 0; i
< argc
; ++i
)
35 #pragma omp teams distribute parallel for proc_bind(x) // omp50-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} omp51-error {{expected 'master', 'close', 'spread' or 'primary' in OpenMP clause 'proc_bind'}}
36 for (i
= 0; i
< argc
; ++i
)
40 #pragma omp teams distribute parallel for proc_bind(master)
41 for (i
= 0; i
< argc
; ++i
)
44 #pragma omp parallel proc_bind(close)
46 #pragma omp teams distribute parallel for proc_bind(spread)
47 for (i
= 0; i
< argc
; ++i
)
53 int main(int argc
, char **argv
) {
56 #pragma omp teams distribute parallel for proc_bind // expected-error {{expected '(' after 'proc_bind'}}
57 for (i
= 0; i
< argc
; ++i
)
60 #pragma omp teams distribute parallel for proc_bind( // omp50-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} omp51-error {{expected 'master', 'close', 'spread' or 'primary' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
61 for (i
= 0; i
< argc
; ++i
)
64 #pragma omp teams distribute parallel for proc_bind() // omp50-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} omp51-error {{expected 'master', 'close', 'spread' or 'primary' in OpenMP clause 'proc_bind'}}
65 for (i
= 0; i
< argc
; ++i
)
68 #pragma omp teams distribute parallel for proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
69 for (i
= 0; i
< argc
; ++i
)
72 #pragma omp teams distribute parallel for proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'proc_bind' clause}}
73 for (i
= 0; i
< argc
; ++i
)
76 #pragma omp teams distribute parallel for proc_bind(x) // omp50-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} omp51-error {{expected 'master', 'close', 'spread' or 'primary' in OpenMP clause 'proc_bind'}}
77 for (i
= 0; i
< argc
; ++i
)
81 #pragma omp teams distribute parallel for proc_bind(master)
82 for (i
= 0; i
< argc
; ++i
)
85 #pragma omp parallel proc_bind(close)
87 #pragma omp teams distribute parallel for proc_bind(spread)
88 for (i
= 0; i
< argc
; ++i
)
90 return tmain
<int, char, 3>(argc
, argv
);