1 | // RUN: %clang_cc1 -verify -fopenmp %s |
2 | |
3 | // RUN: %clang_cc1 -verify -fopenmp-simd %s |
4 | |
5 | void foo(); |
6 | |
7 | int main(int argc, char **argv) { |
8 | #pragma omp target teams distribute parallel for simd default // expected-error {{expected '(' after 'default'}} |
9 | for (int i=0; i<200; i++) foo(); |
10 | |
11 | #pragma omp target teams distribute parallel for simd default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} |
12 | for (int i=0; i<200; i++) foo(); |
13 | |
14 | #pragma omp target teams distribute parallel for simd default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
15 | for (int i=0; i<200; i++) foo(); |
16 | |
17 | #pragma omp target teams distribute parallel for simd default (none // expected-error {{expected ')'}} expected-note {{to match this '('}} |
18 | for (int i=0; i<200; i++) foo(); |
19 | |
20 | #pragma omp target teams distribute parallel for simd default (shared), default(shared) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'default' clause}} |
21 | for (int i=0; i<200; i++) foo(); |
22 | |
23 | #pragma omp target teams distribute parallel for simd default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
24 | for (int i=0; i<200; i++) foo(); |
25 | |
26 | #pragma omp target teams distribute parallel for simd default(none) |
27 | for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} |
28 | |
29 | return 0; |
30 | } |
31 | |