diff options
Diffstat (limited to 'test/OpenMP/taskloop_lastprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/taskloop_lastprivate_messages.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/OpenMP/taskloop_lastprivate_messages.cpp b/test/OpenMP/taskloop_lastprivate_messages.cpp index c46a1f0c4c..929d2b801c 100644 --- a/test/OpenMP/taskloop_lastprivate_messages.cpp +++ b/test/OpenMP/taskloop_lastprivate_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() { } @@ -95,7 +105,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop lastprivate(argc) +#pragma omp taskloop lastprivate(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 parallel @@ -122,7 +132,7 @@ int foomain(int argc, char **argv) { { int v = 0; int i; -#pragma omp taskloop lastprivate(i) +#pragma omp taskloop allocate(omp_thread_mem_alloc: i) lastprivate(i) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'taskloop' directive}} for (int k = 0; k < argc; ++k) { i = k; v += i; |