Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / alloc-5.f90
blob9a1d36b079871cc9d456a7ca7e9e3d146b6e1edc
1 ! { dg-set-target-env-var OMP_ALLOCATOR "omp_cgroup_mem_alloc" }
2 ! { dg-set-target-env-var OMP_DISPLAY_ENV "true" }
4 program main
5 use omp_lib
6 implicit none (external, type)
8 character(len=255) :: mem_env
9 type (omp_alloctrait) :: traits(3)
10 integer (omp_allocator_handle_kind) :: a
12 call get_environment_variable ("OMP_ALLOCATOR", mem_env)
14 if (mem_env == "omp_cgroup_mem_alloc") then
15 if (omp_get_default_allocator () /= omp_cgroup_mem_alloc) stop 1
16 !$omp parallel num_threads (2)
17 if (omp_get_default_allocator () /= omp_cgroup_mem_alloc) stop 2
18 !$omp parallel num_threads (2)
19 if (omp_get_default_allocator () /= omp_cgroup_mem_alloc) stop 3
20 !$omp end parallel
21 !$omp end parallel
22 end if
23 end program