From 24b04aa393d683404aec0e77a5d3915ed8f65eb0 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Fri, 16 Jan 2015 07:11:33 +0000 Subject: [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 --- clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp') 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}} -- cgit v1.2.3