summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/for_simd_linear_messages.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
commitbd9fec1eaacb7f0769017aef8f6f6453dd160b7f (patch)
tree835f6e7bf3f7d0d34ef6536db38a40fc442868a7 /clang/test/OpenMP/for_simd_linear_messages.cpp
parent3c32c83daa5e7ceda3f5cb7cd3bf4059c197a202 (diff)
downloadbcm5719-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_linear_messages.cpp')
-rw-r--r--clang/test/OpenMP/for_simd_linear_messages.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/OpenMP/for_simd_linear_messages.cpp b/clang/test/OpenMP/for_simd_linear_messages.cpp
index 189c8b0be88..44370a15664 100644
--- a/clang/test/OpenMP/for_simd_linear_messages.cpp
+++ b/clang/test/OpenMP/for_simd_linear_messages.cpp
@@ -102,7 +102,7 @@ template<class I, class C> 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 for simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -138,7 +138,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
#pragma omp for simd linear(v:i)
for (int k = 0; k < argc; ++k) { i = k; v += i; }
}
- #pragma omp for simd linear(j) // expected-error {{arguments of OpenMP clause 'linear' cannot be of reference type}}
+ #pragma omp for simd linear(j)
for (int k = 0; k < argc; ++k) ++k;
int v = 0;
#pragma omp for simd linear(v:j)
@@ -166,7 +166,7 @@ int main(int argc, char **argv) {
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
int i;
- int &j = i; // expected-note {{'j' defined here}}
+ int &j = i;
#pragma omp for simd linear // expected-error {{expected '(' after 'linear'}}
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -203,7 +203,7 @@ int main(int argc, char **argv) {
#pragma omp for simd linear(i : 4)
for (int k = 0; k < argc; ++k) { ++k; i += 4; }
}
- #pragma omp for simd linear(j) // expected-error {{arguments of OpenMP clause 'linear' cannot be of reference type 'int &'}}
+ #pragma omp for simd linear(j)
for (int k = 0; k < argc; ++k) ++k;
#pragma omp for simd linear(i)
for (int k = 0; k < argc; ++k) ++k;
OpenPOWER on IntegriCloud