1 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 -ferror-limit 100 -o - %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 -o - %s -Wuninitialized
5 // RUN: %clang_cc1 -verify -DOMP51 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
7 // RUN: %clang_cc1 -verify -DOMP51 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
16 template <class T
, int N
>
21 #pragma omp distribute parallel for default // expected-error {{expected '(' after 'default'}}
22 for (i
= 0; i
< argc
; ++i
)
26 #pragma omp distribute parallel for default( // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
27 for (i
= 0; i
< argc
; ++i
)
31 #pragma omp distribute parallel for default() // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
32 for (i
= 0; i
< argc
; ++i
)
36 #pragma omp distribute parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note 2 {{explicit data sharing attribute requested here}}
37 for (i
= 0; i
< argc
; ++i
) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
41 #pragma omp distribute parallel for default(shared), default(shared) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'default' clause}}
42 for (i
= 0; i
< argc
; ++i
)
46 #pragma omp distribute parallel for default(x) // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
47 for (i
= 0; i
< argc
; ++i
)
51 #pragma omp distribute parallel for default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
52 for (i
= 0; i
< argc
; ++i
) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
55 #pragma omp parallel default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
58 #pragma omp distribute parallel for default(shared)
59 for (i
= 0; i
< argc
; ++i
) // expected-error 2 {{variable 'argc' must have explicitly specified data sharing attributes}}
65 int main(int argc
, char **argv
) {
69 #pragma omp distribute parallel for default // expected-error {{expected '(' after 'default'}}
70 for (i
= 0; i
< argc
; ++i
)
74 #pragma omp distribute parallel for default( // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
75 for (i
= 0; i
< argc
; ++i
)
79 #pragma omp distribute parallel for default() // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
80 for (i
= 0; i
< argc
; ++i
)
84 #pragma omp distribute parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
85 for (i
= 0; i
< argc
; ++i
) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
89 #pragma omp distribute parallel for default(shared), default(shared) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'default' clause}}
90 for (i
= 0; i
< argc
; ++i
)
94 #pragma omp distribute parallel for default(x) // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
95 for (i
= 0; i
< argc
; ++i
)
99 #pragma omp distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
100 for (i
= 0; i
< argc
; ++i
) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
103 #pragma omp parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
106 #pragma omp distribute parallel for default(shared)
107 for (i
= 0; i
< argc
; ++i
) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
113 #pragma omp distribute parallel for default(firstprivate) // expected-note 2 {{explicit data sharing attribute requested here}}
114 for (i
= 0; i
< argc
; ++i
) {
115 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
116 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
120 #pragma omp distribute parallel for default(private) // expected-note 2 {{explicit data sharing attribute requested here}}
121 for (i
= 0; i
< argc
; ++i
) {
122 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
123 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
127 return (tmain
<int, 5>(argc
) + tmain
<char, 1>(argv
[0][0])); // expected-note {{in instantiation of function template specialization 'tmain<int, 5>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<char, 1>' requested here}}