Skip various cmp-mem-const tests on lp64 hppa*-*-*
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / allocate-2.c
blobe4cd09ae065c3ce40848fc3edec272fcf85fa7c9
1 #include <omp.h>
2 #include <stdlib.h>
3 #include <stdint.h>
5 int zero;
7 omp_allocator_handle_t
8 allocator (omp_allocator_handle_t h)
10 if (zero)
11 return h;
12 else
13 abort ();
16 omp_allocator_handle_t
17 align (int a)
19 if (zero)
20 return omp_default_mem_alloc;
21 else
22 abort ();
25 int
26 main ()
28 int x = 1, y = 2;
29 #pragma omp parallel num_threads(2) firstprivate (x, y) allocate (allocator (omp_default_mem_alloc) : x) allocate (align (16) : y)
31 if (x != 1 || y != 2)
32 abort ();
33 if ((((uintptr_t) &y) & 15) != 0)
34 abort ();
36 return 0;