diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/OpenMP/parallel_for_reduction_messages.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'test/OpenMP/parallel_for_reduction_messages.cpp')
-rw-r--r-- | test/OpenMP/parallel_for_reduction_messages.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/OpenMP/parallel_for_reduction_messages.cpp b/test/OpenMP/parallel_for_reduction_messages.cpp index 57ab1fac9c11..6499ef593a3d 100644 --- a/test/OpenMP/parallel_for_reduction_messages.cpp +++ b/test/OpenMP/parallel_for_reduction_messages.cpp @@ -25,9 +25,9 @@ public: S2() : a(0) {} S2(S2 &s2) : a(s2.a) {} static float S2s; // expected-note 2 {{static data member is predetermined as shared}} - static const float S2sc; + static const float S2sc; // expected-note 2 {{'S2sc' declared here}} }; -const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}} +const float S2::S2sc = 0; S2 b; // expected-note 3 {{'b' defined here}} const S2 ba[5]; // expected-note 2 {{'ba' defined here}} class S3 { @@ -61,6 +61,12 @@ class S5 { public: S5(int v) : a(v) {} + void foo() { +#pragma omp parallel private(a) // expected-note {{defined as private}} +#pragma omp for reduction(+:a) // expected-error {{reduction variable must be shared}} + for (int i = 0; i < 10; ++i) + ::foo(); + } }; class S6 { // expected-note 3 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}} #if __cplusplus >= 201103L // C++11 or later |