Debian Codegraph @

libgomp/testsuite/libgomp.fortran/alloc-pinned-1.f90

raw
1 ! Ensure that the ompx_gnu_pinned_mem_alloc predefined allocator is present and
2 ! accepted. The majority of the functionality testing lives in the C tests.
3 !
4 ! { dg-xfail-run-if "Pinning not implemented on this host" { ! *-*-linux-gnu* } }
5
6 program main
7 use omp_lib
8 use ISO_C_Binding
9 implicit none (external, type)
10
11 type(c_ptr) :: p
12
13 p = omp_alloc (10_c_size_t, ompx_gnu_pinned_mem_alloc);
14 if (.not. c_associated (p)) stop 1
15 call omp_free (p, ompx_gnu_pinned_mem_alloc);
16 end program main