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 -fopenmp -DOMP51 -ferror-limit 100 -o - %s -Wuninitialized
7 // RUN: %clang_cc1 -verify -fopenmp-simd -DOMP51 -ferror-limit 100 -o - %s -Wuninitialized
16 int main(int argc
, char **argv
) {
18 #pragma omp parallel for default // expected-error {{expected '(' after 'default'}}
19 for (i
= 0; i
< argc
; ++i
)
21 #pragma omp parallel for default( // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
22 for (i
= 0; i
< argc
; ++i
)
24 #pragma omp parallel for default() // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
25 for (i
= 0; i
< argc
; ++i
)
27 #pragma omp parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{explicit data sharing attribute requested here}}
28 for (i
= 0; i
< argc
; ++i
) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
30 #pragma omp parallel for default(shared), default(shared) // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'default' clause}}
31 for (i
= 0; i
< argc
; ++i
)
33 #pragma omp parallel for default(x) // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
34 for (i
= 0; i
< argc
; ++i
)
37 #pragma omp parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
38 for (i
= 0; i
< argc
; ++i
) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
41 #pragma omp parallel default(none) // expected-note {{explicit data sharing attribute requested here}}
42 #pragma omp parallel for default(shared)
43 for (i
= 0; i
< argc
; ++i
) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
47 #pragma omp parallel for default(firstprivate) // expected-note 2 {{explicit data sharing attribute requested here}}
48 for (i
= 0; i
< argc
; ++i
) {
49 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
50 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
52 #pragma omp parallel for default(private) // expected-note 2 {{explicit data sharing attribute requested here}}
53 for (i
= 0; i
< argc
; ++i
) {
54 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
55 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}