summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_simd_firstprivate_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/target_simd_firstprivate_messages.cpp')
-rw-r--r--clang/test/OpenMP/target_simd_firstprivate_messages.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/test/OpenMP/target_simd_firstprivate_messages.cpp b/clang/test/OpenMP/target_simd_firstprivate_messages.cpp
index 9063937d0a0..eac95ade6f1 100644
--- a/clang/test/OpenMP/target_simd_firstprivate_messages.cpp
+++ b/clang/test/OpenMP/target_simd_firstprivate_messages.cpp
@@ -2,7 +2,16 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s
-extern int omp_default_mem_alloc;
+typedef void **omp_allocator_handle_t;
+extern const omp_allocator_handle_t omp_default_mem_alloc;
+extern const omp_allocator_handle_t omp_large_cap_mem_alloc;
+extern const omp_allocator_handle_t omp_const_mem_alloc;
+extern const omp_allocator_handle_t omp_high_bw_mem_alloc;
+extern const omp_allocator_handle_t omp_low_lat_mem_alloc;
+extern const omp_allocator_handle_t omp_cgroup_mem_alloc;
+extern const omp_allocator_handle_t omp_pteam_mem_alloc;
+extern const omp_allocator_handle_t omp_thread_mem_alloc;
+
void foo() {
}
@@ -109,7 +118,7 @@ int foomain(int argc, char **argv) {
{
int v = 0;
int i;
-#pragma omp target simd firstprivate(i)
+#pragma omp target simd allocate(omp_thread_mem_alloc: i) firstprivate(i) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target simd' directive}}
for (int k = 0; k < argc; ++k) {
i = k;
v += i;
OpenPOWER on IntegriCloud