1 // RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
5 // RUN: %clang_cc1 -verify -fopenmp-version=50 -DOMP50 -fopenmp %s -Wuninitialized
7 // RUN: %clang_cc1 -verify -fopenmp-version=50 -DOMP50 -fopenmp-simd %s -Wuninitialized
16 int main(int argc
, char **argv
) {
17 #pragma omp target teams distribute parallel for default // expected-error {{expected '(' after 'default'}}
18 for (int i
=0; i
<200; i
++) foo();
19 #pragma omp target teams distribute parallel for default( // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
20 for (int i
=0; i
<200; i
++) foo();
21 #pragma omp target teams distribute parallel for default() // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
22 for (int i
=0; i
<200; i
++) foo();
23 #pragma omp target teams distribute parallel for default (none // expected-error {{expected ')'}} expected-note {{to match this '('}}
24 for (int i
=0; i
<200; i
++) foo();
25 #pragma omp target teams distribute parallel for default (shared), default(shared) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'default' clause}}
26 for (int i
=0; i
<200; i
++) foo();
27 #pragma omp target teams distribute parallel for default(x) // expected-error {{expected 'none', 'shared', 'private' or 'firstprivate' in OpenMP clause 'default'}}
28 for (int i
=0; i
<200; i
++) foo();
30 #pragma omp target teams distribute parallel for default(none) // expected-note {{explicit data sharing attribute requested here}}
31 for (int i
=0; i
<200; i
++) ++argc
; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
34 #pragma omp target teams distribute parallel for default(firstprivate) // expected-error {{data-sharing attribute 'firstprivate' in 'default' clause requires OpenMP version 5.1 or above}}
35 for (int i
= 0; i
< 200; i
++) {
39 #pragma omp target teams distribute parallel for default(private) // expected-error {{data-sharing attribute 'private' in 'default' clause requires OpenMP version 5.1 or above}}
40 for (int i
= 0; i
< 200; i
++) {