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}}
16 #pragma omp master nowait // expected-error {{unexpected OpenMP clause 'nowait' in directive '#pragma omp master'}}
17 #pragma omp master unknown // expected-warning {{extra tokens at the end of '#pragma omp master' are ignored}}
21 } // expected-error {{expected statement}}
23 for (int i
= 0; i
< 10; ++i
) {
25 #pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
31 #pragma omp master // expected-error {{region cannot be closely nested inside 'sections' region}}
35 for (int i
= 0; i
< 10; ++i
) {
37 #pragma omp master allocate(i) // expected-error {{region cannot be closely nested inside 'single' region}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp master'}}
41 for (int i
= 0; i
< 10; ++i
) {
46 #pragma omp for ordered
47 for (int i
= 0; i
< 10; ++i
)
48 #pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
57 L1
: // expected-note {{jump exits scope of OpenMP structured block}}
62 goto L1
; // expected-error {{cannot jump from this goto statement to its label}}
64 goto L2
; // expected-error {{cannot jump from this goto statement to its label}}
66 { // expected-note {{jump bypasses OpenMP structured block}}