1  typedef enum omp_allocator_handle_t
       2  #if __cplusplus >= 201103L
       3  : __UINTPTR_TYPE__
       4  #endif
       5  {
       6    omp_null_allocator = 0,
       7    omp_default_mem_alloc = 1,
       8    omp_large_cap_mem_alloc = 2,
       9    omp_const_mem_alloc = 3,
      10    omp_high_bw_mem_alloc = 4,
      11    omp_low_lat_mem_alloc = 5,
      12    omp_cgroup_mem_alloc = 6,
      13    omp_pteam_mem_alloc = 7,
      14    omp_thread_mem_alloc = 8,
      15    __omp_allocator_handle_t_max__ = __UINTPTR_MAX__
      16  } omp_allocator_handle_t;
      17  
      18  int bar (int *);
      19  omp_allocator_handle_t baz (void);
      20  
      21  void
      22  foo (int x, int z)
      23  {
      24    int i;
      25    #pragma omp parallel private (x) allocate (allocator (0.0) : x)	/* { dg-error "'allocate' clause allocator expression has type 'double' rather than 'omp_allocator_handle_t'" } */
      26    bar (&x);
      27    #pragma omp parallel private (x) allocate (allocator (0) : x)	/* { dg-error "'allocate' clause allocator expression has type 'int' rather than 'omp_allocator_handle_t'" } */
      28    bar (&x);
      29    #pragma omp parallel private (x) allocate (align (z) : x)	/* { dg-error "'allocate' clause 'align' modifier argument needs to be positive constant power of two integer expression" } */
      30    bar (&x);
      31    #pragma omp parallel private (x) allocate (align (16.0) : x)	/* { dg-error "'allocate' clause 'align' modifier argument needs to be positive constant power of two integer expression" } */
      32    bar (&x);
      33    #pragma omp parallel private (x) allocate (align (14) : x)	/* { dg-error "'allocate' clause 'align' modifier argument needs to be positive constant power of two integer expression" } */
      34    bar (&x);
      35    #pragma omp parallel private (x) allocate (align (0) : x)	/* { dg-error "'allocate' clause 'align' modifier argument needs to be positive constant power of two integer expression" } */
      36    bar (&x);
      37    #pragma omp parallel private (x) allocate (align (16), align (16) : x)	/* { dg-error "expected|duplicate|declared|specified" } */
      38    bar (&x);									/* { dg-warning "more than once" "" { target c++ } .-1 } */
      39    #pragma omp parallel private (x) allocate (allocator (omp_default_mem_alloc), allocator (omp_default_mem_alloc) : x)	/* { dg-error "expected|duplicate|declared|specified" } */
      40    bar (&x);									/* { dg-warning "more than once" "" { target c++ } .-1 } */
      41  }