summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/nvptx_allocate_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/nvptx_allocate_messages.cpp')
-rw-r--r--clang/test/OpenMP/nvptx_allocate_messages.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/OpenMP/nvptx_allocate_messages.cpp b/clang/test/OpenMP/nvptx_allocate_messages.cpp
index 5bb94222270..e6fb83f6346 100644
--- a/clang/test/OpenMP/nvptx_allocate_messages.cpp
+++ b/clang/test/OpenMP/nvptx_allocate_messages.cpp
@@ -57,6 +57,11 @@ template <class T> T foo() {
T v;
#pragma omp allocate(v) allocator(omp_cgroup_mem_alloc)
v = ST<T>::m;
+#if defined(DEVICE) && !defined(REQUIRES)
+// expected-error@+2 2 {{expected an allocator expression inside of the target region; provide an allocator expression or use 'requires' directive with the 'dynamic_allocators' clause}}
+#endif // DEVICE && !REQUIRES
+#pragma omp parallel private(v) allocate(v)
+ v = 0;
return v;
}
@@ -75,6 +80,7 @@ int main () {
#endif // DEVICE && !REQUIRES
#pragma omp allocate(b)
#if defined(DEVICE) && !defined(REQUIRES)
+// expected-note@+3 {{in instantiation of function template specialization 'foo<int>' requested here}}
// expected-note@+2 {{called by 'main'}}
#endif // DEVICE && !REQUIRES
return (foo<int>() + bar());
OpenPOWER on IntegriCloud