1 // RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
12 int main(int argc
, char **argv
) {
14 #pragma omp teams distribute simd default // expected-error {{expected '(' after 'default'}}
15 for (int i
=0; i
<200; i
++) foo();
17 #pragma omp teams distribute simd default( // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
18 for (int i
=0; i
<200; i
++) foo();
20 #pragma omp teams distribute simd default() // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
21 for (int i
=0; i
<200; i
++) foo();
23 #pragma omp teams distribute simd default (none // expected-error {{expected ')'}} expected-note {{to match this '('}}
24 for (int i
=0; i
<200; i
++) foo();
26 #pragma omp teams distribute simd default (shared), default(shared) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'default' clause}}
27 for (int i
=0; i
<200; i
++) foo();
29 #pragma omp teams distribute simd default(x) // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
30 for (int i
=0; i
<200; i
++) foo();
33 #pragma omp teams distribute simd default(none) // expected-note {{explicit data sharing attribute requested here}}
34 for (int i
=0; i
<200; i
++) ++argc
; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
37 #pragma omp teams distribute simd default(firstprivate) // expected-note {{explicit data sharing attribute requested here}}
38 for (int i
= 0; i
< 200; i
++)
39 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
42 #pragma omp teams distribute simd default(firstprivate) // expected-note {{explicit data sharing attribute requested here}}
43 for (int i
= 0; i
< 200; i
++)
44 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
47 #pragma omp teams distribute simd default(private) // expected-note {{explicit data sharing attribute requested here}}
48 for (int i
= 0; i
< 200; i
++)
49 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
52 #pragma omp teams distribute simd default(private) // expected-note {{explicit data sharing attribute requested here}}
53 for (int i
= 0; i
< 200; i
++)
54 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}