sched1: debug/model: dump predecessor list and BB num [NFC]
[gcc.git] / libgomp / testsuite / libgomp.c / allocator-3.c
bloba28f4e753b0341bbc9a8e3762138ccbf5af69366
1 /* { dg-set-target-env-var OMP_ALLOCATOR " omp_default_mem_space:alignment=512,pinned=false,access=all " } */
2 /* { dg-set-target-env-var OMP_DISPLAY_ENV "true" } */
4 /* We copied the environment string; hence, it may contain white space. */
5 /* { dg-output ".\\\[host\\\] OMP_ALLOCATOR = ' omp_default_mem_space:alignment=512,pinned=false,access=all '.*" } */
7 #include <stdint.h>
8 #include <omp.h>
10 int
11 main ()
13 int *a, *b;
14 a = omp_alloc (sizeof (int) * 1024, omp_null_allocator);
16 omp_allocator_handle_t m = omp_get_default_allocator ();
17 b = omp_alloc (sizeof (int) * 1024, m);
19 if ((uintptr_t) a % 512 != 0)
20 __builtin_abort ();
22 if ((uintptr_t) b % 512 != 0)
23 __builtin_abort ();
24 omp_free (a, omp_null_allocator);
25 omp_free (b, m);
26 return 0;