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