aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/allocators-5.f90
blob: 87088630197b3726f2d4b8fc26912eba9e90d1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-additional-options "-fopenmp-allocators" }
module m
contains
subroutine s(a,b,c,d)
integer, allocatable :: A, B
integer, allocatable :: C(:), D(:)

!$omp allocators allocate(A,B)
allocate(A,B)
call move_alloc(A,B)

!$omp allocators allocate(C,D)
allocate(C(5),D(5))
call move_alloc(C,D)
end

subroutine q()
integer, allocatable :: A, B
integer, allocatable :: C(:), D(:)

call s(a,b,c,d)
end
end

use m
call q
end