summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/for_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-08-18 06:47:21 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-08-18 06:47:21 +0000
commit8e92d549be73392078350b5fb73e7ddbf0605573 (patch)
tree4bacced3f03ab626f5181e9bfaa514f6ef34e9b3 /test/OpenMP/for_codegen.cpp
parentebb65057116c91fb4f07833e7cf7c13ba4e80ce5 (diff)
[OPENMP 4.1] Allow variables with reference types in private clauses.
OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/for_codegen.cpp')
-rw-r--r--test/OpenMP/for_codegen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/OpenMP/for_codegen.cpp b/test/OpenMP/for_codegen.cpp
index fc35a98c9e..824dfd585d 100644
--- a/test/OpenMP/for_codegen.cpp
+++ b/test/OpenMP/for_codegen.cpp
@@ -404,6 +404,10 @@ void for_with_global_lcv() {
k = i;
k = j;
}
+ char &cnt = i;
+#pragma omp for
+ for (cnt = 0; cnt < 2; ++cnt)
+ k = cnt;
}
// CHECK-LABEL: for_with_references