diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-01-16 07:11:33 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-01-16 07:11:33 +0000 |
commit | 2fcd952ceadde6f14796d98b85ba7b6317a44baa (patch) | |
tree | 58a96e600695b935b64cc0c8bb8354378759708f /test/OpenMP/teams_reduction_messages.cpp | |
parent | 1d11866537a9bf722c9c5b516151c23434242e24 (diff) |
[OPENMP] Fixed data-sharing attributes processing for variables with global
storage.
This fix allows to use non-constant global variables, static local variables and static data
members in data-sharing attribute clauses in parallel and task regions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/teams_reduction_messages.cpp')
-rw-r--r-- | test/OpenMP/teams_reduction_messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/OpenMP/teams_reduction_messages.cpp b/test/OpenMP/teams_reduction_messages.cpp index afedfc3e46..18b7cd4bc3 100644 --- a/test/OpenMP/teams_reduction_messages.cpp +++ b/test/OpenMP/teams_reduction_messages.cpp @@ -16,7 +16,7 @@ class S2 { public: S2() : a(0) {} S2(S2 &s2) : a(s2.a) {} - static float S2s; // expected-note 2 {{static data member is predetermined as shared}} + static float S2s; static const float S2sc; }; const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}} @@ -136,7 +136,7 @@ T tmain(T argc) { // expected-note 2 {{'argc' defined here}} #pragma omp teams reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}} foo(); #pragma omp target -#pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} +#pragma omp teams reduction(&& : S2::S2s) foo(); #pragma omp target #pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp teams reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}} foo(); #pragma omp target -#pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} +#pragma omp teams reduction(&& : S2::S2s) foo(); #pragma omp target #pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} |