1 // RUN: %clang_cc1 -verify -DOMP51 -fopenmp %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -DOMP51 -fopenmp-simd %s -Wuninitialized
5 // RUN: %clang_cc1 -verify -fopenmp-version=50 -fopenmp %s -Wuninitialized
7 // RUN: %clang_cc1 -verify -fopenmp-version=50 -fopenmp-simd %s -Wuninitialized
16 int main(int argc
, char **argv
) {
18 #pragma omp teams distribute default // expected-error {{expected '(' after 'default'}}
19 for (int i
=0; i
<200; i
++) foo();
21 #pragma omp teams distribute default( // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
22 for (int i
=0; i
<200; i
++) foo();
24 #pragma omp teams distribute default() // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
25 for (int i
=0; i
<200; i
++) foo();
27 #pragma omp teams distribute default (none // expected-error {{expected ')'}} expected-note {{to match this '('}}
28 for (int i
=0; i
<200; i
++) foo();
30 #pragma omp teams distribute default (shared), default(shared) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'default' clause}}
31 for (int i
=0; i
<200; i
++) foo();
33 #pragma omp teams distribute default(x) // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
34 for (int i
=0; i
<200; i
++) foo();
37 #pragma omp teams distribute default(none) // expected-note {{explicit data sharing attribute requested here}}
38 for (int i
=0; i
<200; i
++) ++argc
; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
42 #pragma omp teams distribute default(firstprivate) // expected-note 2 {{explicit data sharing attribute requested here}}
43 for (int i
= 0; i
< 200; i
++) {
44 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
45 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}
48 #pragma omp teams distribute default(private) // expected-note 2 {{explicit data sharing attribute requested here}}
49 for (int i
= 0; i
< 200; i
++) {
50 ++x
; // expected-error {{variable 'x' must have explicitly specified data sharing attributes}}
51 ++y
; // expected-error {{variable 'y' must have explicitly specified data sharing attributes}}