summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/target_parallel_for_reduction_messages.cpp')
-rw-r--r--clang/test/OpenMP/target_parallel_for_reduction_messages.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp b/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp
index 8eeafd45488..3b201f2f2ee 100644
--- a/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_reduction_messages.cpp
@@ -6,7 +6,16 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %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() {
}
@@ -316,7 +325,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < 10; ++i)
foo();
static int m;
-#pragma omp target parallel for reduction(+ : m) // OK
+#pragma omp target parallel for allocate(omp_thread_mem_alloc: m) reduction(+ : m) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel for' directive}}
for (int i = 0; i < 10; ++i)
m++;
OpenPOWER on IntegriCloud