aboutsummaryrefslogtreecommitdiff
path: root/test/OpenMP/target_simd_firstprivate_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/target_simd_firstprivate_messages.cpp')
-rw-r--r--test/OpenMP/target_simd_firstprivate_messages.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/OpenMP/target_simd_firstprivate_messages.cpp b/test/OpenMP/target_simd_firstprivate_messages.cpp
index 85b216b4cb..eac95ade6f 100644
--- a/test/OpenMP/target_simd_firstprivate_messages.cpp
+++ b/test/OpenMP/target_simd_firstprivate_messages.cpp
@@ -2,6 +2,16 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s
+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() {
}
@@ -86,7 +96,7 @@ int foomain(int argc, char **argv) {
#pragma omp target simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (int k = 0; k < argc; ++k)
++k;
-#pragma omp target simd firstprivate(argc)
+#pragma omp target simd firstprivate(argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
for (int k = 0; k < argc; ++k)
++k;
#pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
@@ -108,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;