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 | 24b04aa393d683404aec0e77a5d3915ed8f65eb0 (patch) | |
tree | fc1eee0dabaa6d1dc7a72aea25ca10bfe1cced9c /clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp | |
parent | 76861ea8f71f450ef9493108aa5581d442e2a8b0 (diff) | |
download | bcm5719-llvm-24b04aa393d683404aec0e77a5d3915ed8f65eb0.tar.gz bcm5719-llvm-24b04aa393d683404aec0e77a5d3915ed8f65eb0.zip |
[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.
llvm-svn: 226250
Diffstat (limited to 'clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp index 61690ddd42c..2395cbd686f 100644 --- a/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_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}} @@ -135,7 +135,7 @@ T tmain(T argc) { // expected-note 2 {{'argc' defined here}} #pragma omp parallel for simd reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} +#pragma omp parallel for simd reduction(&& : S2::S2s) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} @@ -249,7 +249,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} +#pragma omp parallel for simd reduction(&& : S2::S2s) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} |