summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-12-01 17:40:15 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-12-01 17:40:15 +0000
commite05cbf9fd88c77c1a454b45ef3e0e8978e7bd979 (patch)
tree689b926cae84c6996c134efea147efe7f9b84ed6 /test/OpenMP/distribute_parallel_for_simd_ast_print.cpp
parent77d451a53d8c57ffc3f7d90c0f8d4b0c045579e7 (diff)
[OPENMP] Do not allow variables to be first|last-privates in
distribute directives. OpenMP standard does not allow to mark the variables as firstprivate and lastprivate at the same time in distribute-based directives. Patch fixes this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/distribute_parallel_for_simd_ast_print.cpp')
-rw-r--r--test/OpenMP/distribute_parallel_for_simd_ast_print.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp b/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp
index 464acbe19c..21010638be 100644
--- a/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp
+++ b/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp
@@ -83,7 +83,7 @@ T tmain(T argc) {
// CHECK-NEXT: a = 2;
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) if (parallel :argc) num_threads(N) default(shared) shared(e) reduction(+ : h) dist_schedule(static,N)
+#pragma omp distribute parallel for simd private(argc, b), firstprivate(c, d), lastprivate(f) collapse(N) schedule(static, N) if (parallel :argc) num_threads(N) default(shared) shared(e) reduction(+ : h) dist_schedule(static,N)
for (int i = 0; i < 2; ++i)
for (int j = 0; j < 2; ++j)
for (int j = 0; j < 2; ++j)
@@ -94,8 +94,8 @@ T tmain(T argc) {
for (int j = 0; j < 2; ++j)
for (int j = 0; j < 2; ++j)
for (int j = 0; j < 2; ++j)
- a++;
- // CHECK: #pragma omp distribute parallel for simd private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) if(parallel: argc) num_threads(N) default(shared) shared(e) reduction(+: h) dist_schedule(static, N)
+ a++;
+ // CHECK: #pragma omp distribute parallel for simd private(argc,b) firstprivate(c,d) lastprivate(f) collapse(N) schedule(static, N) if(parallel: argc) num_threads(N) default(shared) shared(e) reduction(+: h) dist_schedule(static, N)
// CHECK-NEXT: for (int i = 0; i < 2; ++i)
// CHECK-NEXT: for (int j = 0; j < 2; ++j)
// CHECK-NEXT: for (int j = 0; j < 2; ++j)