summaryrefslogtreecommitdiff
path: root/test/OpenMP/target_map_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-12-05 15:22:49 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-12-05 15:22:49 +0000
commit6dee2d7289477053eeefb85a920952b45a2e1cde (patch)
tree260f911fd09b6611a6960cb536bcc7e7cd3e2845 /test/OpenMP/target_map_messages.cpp
parent13391081b0b149da4168377ceb1b4af083407d3b (diff)
downloadclang-6dee2d7289477053eeefb85a920952b45a2e1cde.tar.gz
[OPENMP] Fix assert fail after target implicit map checks.
If the error is generated during analysis of implicitly or explicitly mapped variables, it may cause compiler crash because of incorrect analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/target_map_messages.cpp')
-rw-r--r--test/OpenMP/target_map_messages.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/OpenMP/target_map_messages.cpp b/test/OpenMP/target_map_messages.cpp
index f607dcf369..52a492920f 100644
--- a/test/OpenMP/target_map_messages.cpp
+++ b/test/OpenMP/target_map_messages.cpp
@@ -269,6 +269,10 @@ void SAclient(int arg) {
{}
#pragma omp target map(u.B) // expected-error {{mapped storage cannot be derived from a union}}
{}
+ #pragma omp target
+ {
+ u.B = 0; // expected-error {{mapped storage cannot be derived from a union}}
+ }
#pragma omp target data map(to: r.C) //expected-note {{used here}}
{