2 // { dg-additional-options "-std=c++11" }
4 typedef enum omp_allocator_handle_t
5 #if __cplusplus >= 201103L
9 omp_null_allocator = 0,
10 omp_default_mem_alloc = 1,
11 omp_large_cap_mem_alloc = 2,
12 omp_const_mem_alloc = 3,
13 omp_high_bw_mem_alloc = 4,
14 omp_low_lat_mem_alloc = 5,
15 omp_cgroup_mem_alloc = 6,
16 omp_pteam_mem_alloc = 7,
17 omp_thread_mem_alloc = 8,
18 __omp_allocator_handle_t_max__ = __UINTPTR_MAX__
19 } omp_allocator_handle_t;
23 using ::omp_allocator_handle_t;
25 foo (const omp_allocator_handle_t h)
28 #pragma omp parallel allocate (h: x) private (x)
35 typedef enum omp_allocator_handle_t { my = 0 } omp_allocator_handle_t;
37 foo (omp_allocator_handle_t h)
40 #pragma omp parallel allocate (h: x) private (x) // { dg-error "'allocate' clause allocator expression has type 'N2::omp_allocator_handle_t' rather than 'omp_allocator_handle_t'" }
49 #pragma omp parallel allocate (omp_default_mem_alloc:s) firstprivate (s)
60 #pragma omp parallel allocate (omp_default_mem_alloc:s) firstprivate (s)
71 #pragma omp parallel firstprivate (x) allocate (t: x)
80 #pragma omp parallel firstprivate (x) allocate (t: x) // { dg-error "'allocate' clause allocator expression has type 'int' rather than 'omp_allocator_handle_t'" }
85 omp_allocator_handle_t h;
88 int c = U<int> ().foo ();