|
1 | 1 | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -triple x86_64-unknown-unknown -verify=expected,omp50 %s -Wuninitialized
|
2 |
| -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify=expected,omp51 %s -Wuninitialized |
| 2 | +// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=51 -triple x86_64-unknown-unknown -verify=expected,omp51 %s -Wuninitialized |
| 3 | +// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=52 -triple x86_64-unknown-unknown -verify=expected,omp51 %s -Wuninitialized |
| 4 | +// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -verify=expected,omp60 %s -Wuninitialized |
3 | 5 |
|
4 | 6 | // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -triple x86_64-unknown-unknown -verify=expected,omp50 %s -Wuninitialized
|
5 |
| -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify=expected,omp51 %s -Wuninitialized |
| 7 | +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=51 -triple x86_64-unknown-unknown -verify=expected,omp51 %s -Wuninitialized |
| 8 | +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=52 -triple x86_64-unknown-unknown -verify=expected,omp51 %s -Wuninitialized |
| 9 | +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=60 -triple x86_64-unknown-unknown -verify=expected,omp60 %s -Wuninitialized |
6 | 10 |
|
7 | 11 | extern int omp_get_num_threads (void);
|
8 | 12 |
|
@@ -35,13 +39,61 @@ int main(int argc, char **argv) {
|
35 | 39 |
|
36 | 40 | #pragma omp parallel for order(reproducible: concurrent) // omp50-error {{expected 'concurrent' in OpenMP clause 'order'}}
|
37 | 41 | for (int i = 0; i < 10; ++i) {
|
38 |
| -#pragma omp target //omp51-error {{construct 'target' not allowed in a region associated with a directive with 'order' clause}} |
| 42 | +#pragma omp target //omp51-error {{construct 'target' not allowed in a region associated with a directive with 'order' clause}} omp60-error {{construct 'target' not allowed in a region associated with a directive with 'order' clause}} |
39 | 43 | A++;
|
40 | 44 | }
|
41 | 45 |
|
42 | 46 | #pragma omp parallel for order(unconstrained: concurrent) // omp50-error {{expected 'concurrent' in OpenMP clause 'order'}}
|
43 | 47 | for (int i = 0; i < 10; ++i) {
|
44 |
| -#pragma omp target //omp51-error {{construct 'target' not allowed in a region associated with a directive with 'order' clause}} |
| 48 | +#pragma omp target //omp51-error {{construct 'target' not allowed in a region associated with a directive with 'order' clause}} omp60-error {{construct 'target' not allowed in a region associated with a directive with 'order' clause}} |
45 | 49 | A++;
|
46 | 50 | }
|
| 51 | + |
| 52 | +#pragma omp loop bind(parallel) order(concurrent) |
| 53 | + for (int i = 0; i < 10; ++i) { |
| 54 | +#pragma omp parallel for //omp60-error {{construct 'parallel for' not allowed in a region associated with a directive with 'order' clause}} |
| 55 | + for (int j = 0; j < 10; ++j) { |
| 56 | + A += j; |
| 57 | + } |
| 58 | + } |
| 59 | + |
| 60 | +#pragma omp distribute order(concurrent) |
| 61 | + for (int i = 0; i < 10; ++i) { |
| 62 | +#pragma omp parallel for simd //omp60-error {{construct 'parallel for simd' not allowed in a region associated with a directive with 'order' clause}} |
| 63 | + for (int j = 0; j < 10; ++j) { |
| 64 | + A += j; |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | +#pragma omp for order(concurrent) |
| 69 | + for (int i = 0; i < 10; ++i) { |
| 70 | +#pragma omp parallel master //omp60-error {{construct 'parallel master' not allowed in a region associated with a directive with 'order' clause}} |
| 71 | + for (int j = 0; j < 10; ++j) { |
| 72 | + A += j; |
| 73 | + } |
| 74 | + } |
| 75 | + |
| 76 | +#pragma omp for order(concurrent) |
| 77 | + for (int i = 0; i < 10; ++i) { |
| 78 | +#pragma omp parallel master taskloop //omp60-error {{construct 'parallel master taskloop' not allowed in a region associated with a directive with 'order' clause}} |
| 79 | + for (int j = 0; j < 10; ++j) { |
| 80 | + A += j; |
| 81 | + } |
| 82 | + } |
| 83 | + |
| 84 | +#pragma omp for order(concurrent) |
| 85 | + for (int i = 0; i < 10; ++i) { |
| 86 | +#pragma omp parallel master taskloop simd //omp60-error {{construct 'parallel master taskloop simd' not allowed in a region associated with a directive with 'order' clause}} |
| 87 | + for (int j = 0; j < 10; ++j) { |
| 88 | + A += j; |
| 89 | + } |
| 90 | + } |
| 91 | + |
| 92 | +#pragma omp for order(concurrent) |
| 93 | + for (int i = 0; i < 10; ++i) { |
| 94 | + #pragma omp parallel sections //omp60-error {{construct 'parallel sections' not allowed in a region associated with a directive with 'order' clause}} |
| 95 | + { |
| 96 | + A++; |
| 97 | + } |
| 98 | + } |
47 | 99 | }
|
0 commit comments