| 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 default // expected-error {{expected '(' after 'default'}} |
| 9 | for (int i=0; i<200; i++) foo(); |
| 10 | #pragma omp target teams distribute parallel for default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} |
| 11 | for (int i=0; i<200; i++) foo(); |
| 12 | #pragma omp target teams distribute parallel for default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
| 13 | for (int i=0; i<200; i++) foo(); |
| 14 | #pragma omp target teams distribute parallel for default (none // expected-error {{expected ')'}} expected-note {{to match this '('}} |
| 15 | for (int i=0; i<200; i++) foo(); |
| 16 | #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}} |
| 17 | for (int i=0; i<200; i++) foo(); |
| 18 | #pragma omp target teams distribute parallel for default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
| 19 | for (int i=0; i<200; i++) foo(); |
| 20 | |
| 21 | #pragma omp target teams distribute parallel for default(none) |
| 22 | for (int i=0; i<200; i++) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} |
| 23 | |
| 24 | return 0; |
| 25 | } |
| 26 | |