1 // RUN: %clang_cc1 -verify=expected,omp51 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
3 // RUN: %clang_cc1 -verify=expected,omp51 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
5 // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp -fopenmp-version=50 -ferror-limit 100 -o - %s -Wuninitialized
7 // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 -o - %s -Wuninitialized
11 template <class T
, typename S
, int N
>
12 T
tmain(T argc
, S
**argv
) {
16 #pragma omp distribute parallel for simd proc_bind // expected-error {{expected '(' after 'proc_bind'}}
17 for (i
= 0; i
< argc
; ++i
)
21 #pragma omp distribute parallel for simd 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 '('}}
22 for (i
= 0; i
< argc
; ++i
)
26 #pragma omp distribute parallel for simd 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'}}
27 for (i
= 0; i
< argc
; ++i
)
31 #pragma omp distribute parallel for simd proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
32 for (i
= 0; i
< argc
; ++i
)
36 #pragma omp distribute parallel for simd proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'proc_bind' clause}}
37 for (i
= 0; i
< argc
; ++i
)
41 #pragma omp distribute parallel for simd 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'}}
42 for (i
= 0; i
< argc
; ++i
)
47 #pragma omp distribute parallel for simd proc_bind(master)
48 for (i
= 0; i
< argc
; ++i
)
51 #pragma omp parallel proc_bind(close)
54 #pragma omp distribute parallel for simd proc_bind(spread)
55 for (i
= 0; i
< argc
; ++i
)
61 int main(int argc
, char **argv
) {
65 #pragma omp distribute parallel for simd proc_bind // expected-error {{expected '(' after 'proc_bind'}}
66 for (i
= 0; i
< argc
; ++i
)
70 #pragma omp distribute parallel for simd 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 '('}}
71 for (i
= 0; i
< argc
; ++i
)
75 #pragma omp distribute parallel for simd 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'}}
76 for (i
= 0; i
< argc
; ++i
)
80 #pragma omp distribute parallel for simd proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
81 for (i
= 0; i
< argc
; ++i
)
85 #pragma omp distribute parallel for simd proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'proc_bind' clause}}
86 for (i
= 0; i
< argc
; ++i
)
90 #pragma omp distribute parallel for simd 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'}}
91 for (i
= 0; i
< argc
; ++i
)
96 #pragma omp distribute parallel for simd proc_bind(master)
97 for (i
= 0; i
< argc
; ++i
)
100 #pragma omp parallel proc_bind(close)
103 #pragma omp distribute parallel for simd proc_bind(spread)
104 for (i
= 0; i
< argc
; ++i
)
106 return tmain
<int, char, 3>(argc
, argv
);