diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-08-18 06:47:21 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-08-18 06:47:21 +0000 |
commit | bd9fec1eaacb7f0769017aef8f6f6453dd160b7f (patch) | |
tree | 835f6e7bf3f7d0d34ef6536db38a40fc442868a7 /clang/test/OpenMP/for_codegen.cpp | |
parent | 3c32c83daa5e7ceda3f5cb7cd3bf4059c197a202 (diff) | |
download | bcm5719-llvm-bd9fec1eaacb7f0769017aef8f6f6453dd160b7f.tar.gz bcm5719-llvm-bd9fec1eaacb7f0769017aef8f6f6453dd160b7f.zip |
[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.
llvm-svn: 245268
Diffstat (limited to 'clang/test/OpenMP/for_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/for_codegen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/OpenMP/for_codegen.cpp b/clang/test/OpenMP/for_codegen.cpp index fc35a98c9ed..824dfd585dc 100644 --- a/clang/test/OpenMP/for_codegen.cpp +++ b/clang/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 |