summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/target_data_device_messages.cpp
diff options
context:
space:
mode:
authorArpith Chacko Jacob <acjacob@us.ibm.com>2016-02-01 16:32:47 +0000
committerArpith Chacko Jacob <acjacob@us.ibm.com>2016-02-01 16:32:47 +0000
commit3568e530bf06790b2d8e79cec3bfd46811699693 (patch)
treea242de07e29eb0dbcb8200d5fd5da2375c777a00 /test/OpenMP/target_data_device_messages.cpp
parent31c95759cb46dbff448da69f95a1a4ea4471d52c (diff)
[OpenMP] Prevent nesting of target constructs within target code execution regions.
Summary: This patch enhances Sema to check for the following restriction: OpenMP 4.5 [2.17 Nesting of Regions] If a target, target update, target data, target enter data, or target exit data construct is encountered during execution of a target region, the behavior is unspecified. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16758 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/target_data_device_messages.cpp')
-rw-r--r--test/OpenMP/target_data_device_messages.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/OpenMP/target_data_device_messages.cpp b/test/OpenMP/target_data_device_messages.cpp
index a46afee035..9ed7a54b43 100644
--- a/test/OpenMP/target_data_device_messages.cpp
+++ b/test/OpenMP/target_data_device_messages.cpp
@@ -21,8 +21,8 @@ int main(int argc, char **argv) {
#pragma omp target data map(to: a) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}}
#pragma omp target data map(to: a) device (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target data map(to: a) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
- #pragma omp target map(to: a) device (-10u)
- #pragma omp target map(to: a) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
+ #pragma omp target data map(to: a) device (-10u)
+ #pragma omp target data map(to: a) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
return 0;