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_simd_firstprivate_messages.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_simd_firstprivate_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/for_simd_firstprivate_messages.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/OpenMP/for_simd_firstprivate_messages.cpp b/clang/test/OpenMP/for_simd_firstprivate_messages.cpp index 6b49b11eaff..8f93e52cfbd 100644 --- a/clang/test/OpenMP/for_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/for_simd_firstprivate_messages.cpp @@ -65,7 +65,7 @@ int foomain(int argc, char **argv) { I e(4); C g(5); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp parallel #pragma omp for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -130,7 +130,7 @@ int foomain(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp for simd firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp for simd firstprivate(j) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -168,7 +168,7 @@ int main(int argc, char **argv) { S3 m; S6 n(2); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp parallel #pragma omp for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -271,7 +271,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp for simd firstprivate(j) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel |