diff options
Diffstat (limited to 'test/OpenMP/task_firstprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/task_firstprivate_messages.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/OpenMP/task_firstprivate_messages.cpp b/test/OpenMP/task_firstprivate_messages.cpp index d970f097a5..f299c75518 100644 --- a/test/OpenMP/task_firstprivate_messages.cpp +++ b/test/OpenMP/task_firstprivate_messages.cpp @@ -2,6 +2,16 @@ // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %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() { } @@ -13,7 +23,7 @@ template <typename T> struct S { T b; S(T a, T c) { -#pragma omp task default(none) firstprivate(a, b) +#pragma omp task default(none) firstprivate(a, b) // expected-note {{explicit data sharing attribute requested here}} a = b = c; // expected-error {{variable 'c' must have explicitly specified data sharing attributes}} } }; @@ -91,11 +101,11 @@ int main(int argc, char **argv) { #pragma omp task firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} -#pragma omp task firstprivate(argc) +#pragma omp task 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 '('}} #pragma omp task firstprivate(S1) // expected-error {{'S1' does not refer to a value}} #pragma omp task firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} #pragma omp task firstprivate(argv[1]) // expected-error {{expected variable name}} -#pragma omp task firstprivate(ba) +#pragma omp task allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'task' directive}} #pragma omp task firstprivate(ca) #pragma omp task firstprivate(da) #pragma omp task firstprivate(S2::S2s) |