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 | 8e92d549be73392078350b5fb73e7ddbf0605573 (patch) | |
tree | 4bacced3f03ab626f5181e9bfaa514f6ef34e9b3 /test/OpenMP/sections_private_messages.cpp | |
parent | ebb65057116c91fb4f07833e7cf7c13ba4e80ce5 (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/sections_private_messages.cpp')
-rw-r--r-- | test/OpenMP/sections_private_messages.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/OpenMP/sections_private_messages.cpp b/test/OpenMP/sections_private_messages.cpp index 7854b3d8bd..5628bbd048 100644 --- a/test/OpenMP/sections_private_messages.cpp +++ b/test/OpenMP/sections_private_messages.cpp @@ -47,7 +47,7 @@ int foomain(I argc, C **argv) { I e(4); I g(5); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp sections private // expected-error {{expected '(' after 'private'}} { foo(); @@ -112,7 +112,7 @@ int foomain(I argc, C **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}} +#pragma omp sections private(j) { foo(); } @@ -135,7 +135,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp sections private // expected-error {{expected '(' after 'private'}} { foo(); @@ -198,7 +198,7 @@ int main(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}} +#pragma omp sections private(j) { foo(); } |