summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/simd_loop_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-06-28 16:16:00 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-06-28 16:16:00 +0000
commit73f9d9aa64bd43dab8a78d2ce65e7782427ba8fa (patch)
tree0b978c14236b0ed2b1abfc1de16302c675085f55 /clang/test/OpenMP/simd_loop_messages.cpp
parente39e958da36da52d34e883dd5820262e96a8781a (diff)
downloadbcm5719-llvm-73f9d9aa64bd43dab8a78d2ce65e7782427ba8fa.tar.gz
bcm5719-llvm-73f9d9aa64bd43dab8a78d2ce65e7782427ba8fa.zip
[OPENMP]Fix top DSA for static members.
Fixed handling of the data-sharing attributes for static members when requesting top most attribute. Previously, it might return the incorrect attributes for static members if they were overriden in the outer constructs. llvm-svn: 364655
Diffstat (limited to 'clang/test/OpenMP/simd_loop_messages.cpp')
-rw-r--r--clang/test/OpenMP/simd_loop_messages.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/OpenMP/simd_loop_messages.cpp b/clang/test/OpenMP/simd_loop_messages.cpp
index 81340203748..975cd7f90f7 100644
--- a/clang/test/OpenMP/simd_loop_messages.cpp
+++ b/clang/test/OpenMP/simd_loop_messages.cpp
@@ -9,6 +9,7 @@ static int sii;
static int globalii;
struct S {
+ // expected-note@+1 {{static data member is predetermined as shared}}
static int ssi;
};
@@ -21,6 +22,10 @@ int test_iteration_spaces() {
#pragma omp simd linear(S::ssi)
for (S::ssi = 0; S::ssi < 10; ++S::ssi)
;
+// expected-error@+1 {{shared variable cannot be private}}
+#pragma omp simd private(S::ssi)
+ for (S::ssi = 0; S::ssi < 10; ++S::ssi)
+ ;
#pragma omp simd // no messages expected
for (S::ssi = 0; S::ssi < 10; ++S::ssi)
;
OpenPOWER on IntegriCloud