diff options
Diffstat (limited to 'test/OpenMP/target_simd_private_messages.cpp')
-rw-r--r-- | test/OpenMP/target_simd_private_messages.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/OpenMP/target_simd_private_messages.cpp b/test/OpenMP/target_simd_private_messages.cpp index 1b7d864c7c..f95d77c302 100644 --- a/test/OpenMP/target_simd_private_messages.cpp +++ b/test/OpenMP/target_simd_private_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() { } @@ -58,7 +68,7 @@ public: S6() : a(0) {} S6(T v) : a(v) { -#pragma omp target simd private(a) private(this->a) +#pragma omp target simd private(a) private(this->a) allocate(omp_thread_mem_alloc: a) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target simd' directive}} for (int k = 0; k < v; ++k) ++this->a; } @@ -116,7 +126,7 @@ int foomain(I argc, C **argv) { #pragma omp target simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd private(argc) +#pragma omp target simd private(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 private(S1) // expected-error {{'S1' does not refer to a value}} @@ -166,7 +176,7 @@ using A::x; int main(int argc, char **argv) { S4 e(4); S5 g(5); - S6<float> s6(0.0) , s6_0(1.0); + S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}} S7<S6<float> > s7(0.0) , s7_0(1.0); int i; int &j = i; |