1 // RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
6 int x
; // expected-note {{initialize the variable 'x' to silence this warning}}
7 #pragma omp parallel masked
8 argc
= x
; // expected-warning {{variable 'x' is uninitialized when used here}}
11 #pragma omp parallel masked // expected-error {{unexpected OpenMP directive '#pragma omp parallel masked'}}
20 int main(int argc
, char **argv
) {
21 #pragma omp parallel masked nowait // expected-error {{unexpected OpenMP clause 'nowait' in directive '#pragma omp parallel masked'}}
22 #pragma omp parallel masked unknown // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
26 } // expected-error {{expected statement}}
28 #pragma omp parallel masked
29 } // expected-error {{expected statement}}
33 #pragma omp parallel masked filter(tid)
35 #pragma omp parallel masked { // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
37 #pragma omp parallel masked ( // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
39 #pragma omp parallel masked [ // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
41 #pragma omp parallel masked ] // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
43 #pragma omp parallel masked ) // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
45 #pragma omp parallel masked } // expected-warning {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
47 #pragma omp parallel masked
48 // expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel masked' are ignored}}
49 #pragma omp parallel masked unknown()
53 #pragma omp parallel masked
55 #pragma omp parallel masked
58 for (int i
= 0; i
< 10; ++i
) {
61 #pragma omp parallel masked
64 break; // expected-error {{'break' statement not in loop or switch statement}}
65 continue; // expected-error {{'continue' statement not in loop statement}}
71 goto L1
; // expected-error {{use of undeclared label 'L1'}}
74 #pragma omp parallel masked default(none) // expected-note 2 {{explicit data sharing attribute requested here}}
76 ++argc
; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
77 ++a
; // expected-error {{variable 'a' must have explicitly specified data sharing attributes}}
80 goto L2
; // expected-error {{use of undeclared label 'L2'}}
81 #pragma omp parallel masked
84 #pragma omp parallel masked
86 return 1; // expected-error {{cannot return from OpenMP region}}