Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / alloc-3.c
bloba30cdc05e6051302253ec6c46dfdef4756826df3
1 /* { dg-set-target-env-var OMP_ALLOCATOR "omp_cgroup_mem_alloc" } */
2 /* { dg-set-target-env-var OMP_DISPLAY_ENV "true" } */
4 #include <string.h>
5 #include <stdlib.h>
6 #include <omp.h>
8 int
9 main ()
11 const char *p = getenv ("OMP_ALLOCATOR");
12 if (p && strcmp (p, "omp_cgroup_mem_alloc") == 0)
14 if (omp_get_default_allocator () != omp_cgroup_mem_alloc)
15 abort ();
16 #pragma omp parallel num_threads (2)
18 if (omp_get_default_allocator () != omp_cgroup_mem_alloc)
19 abort ();
20 #pragma omp parallel num_threads (2)
22 if (omp_get_default_allocator () != omp_cgroup_mem_alloc)
23 abort ();
27 return 0;