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}}
8 argc
= x
; // expected-warning {{variable 'x' is uninitialized when used here}}
12 int x
; // expected-note {{initialize the variable 'x' to silence this warning}}
13 #pragma omp masked filter(1)
14 argc
= x
; // expected-warning {{variable 'x' is uninitialized when used here}}
22 #pragma omp masked filter(1) filter(2) // expected-error {{directive '#pragma omp masked' cannot contain more than one 'filter' clause}}
25 #pragma omp masked filter(x) filter(y) filter(z) // expected-error 2 {{directive '#pragma omp masked' cannot contain more than one 'filter' clause}}
27 #pragma omp masked nowait // expected-error {{unexpected OpenMP clause 'nowait' in directive '#pragma omp masked'}}
28 #pragma omp masked unknown // expected-warning {{extra tokens at the end of '#pragma omp masked' are ignored}}
32 } // expected-error {{expected statement}}
34 #pragma omp masked filter(2)
35 } // expected-error {{expected statement}}
37 for (int i
= 0; i
< 10; ++i
) {
39 #pragma omp masked filter(1) // expected-error {{region cannot be closely nested inside 'for' region}}
45 #pragma omp masked // expected-error {{region cannot be closely nested inside 'sections' region}}
49 for (int i
= 0; i
< 10; ++i
) {
51 #pragma omp masked allocate(i) // expected-error {{region cannot be closely nested inside 'single' region}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp masked'}}
55 for (int i
= 0; i
< 10; ++i
) {
60 #pragma omp for ordered
61 for (int i
= 0; i
< 10; ++i
)
62 #pragma omp masked // expected-error {{region cannot be closely nested inside 'for' region}}
71 L1
: // expected-note {{jump exits scope of OpenMP structured block}}
73 #pragma omp masked filter(0)
76 goto L1
; // expected-error {{cannot jump from this goto statement to its label}}
78 goto L2
; // expected-error {{cannot jump from this goto statement to its label}}
79 #pragma omp masked filter(-2)
80 { // expected-note {{jump bypasses OpenMP structured block}}