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_firstprivate_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_firstprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/sections_firstprivate_messages.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/OpenMP/sections_firstprivate_messages.cpp b/test/OpenMP/sections_firstprivate_messages.cpp index ff7614967e..c744bfecc0 100644 --- a/test/OpenMP/sections_firstprivate_messages.cpp +++ b/test/OpenMP/sections_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 sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -143,7 +143,7 @@ int foomain(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp sections firstprivate(j) { foo(); } @@ -186,7 +186,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 sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -304,7 +304,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp sections firstprivate(j) { foo(); } |