blob: c7f90131cbae92b9917516d05fbc3da78f8d6a4d (
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
28
29
30
31
32
|
! { dg-do run }
module mymod
type F
integer :: a, b, c
integer, dimension(10) :: d
end type F
type G
integer :: x, y
type(F), pointer :: myf
integer :: z
end type G
end module mymod
program myprog
use mymod
type(F), target :: ftmp
type(G) :: gvar
gvar%myf => ftmp
gvar%myf%d = 0
!$omp target map(to:gvar%myf) map(tofrom: gvar%myf%b, gvar%myf%d)
gvar%myf%d(1) = gvar%myf%d(1) + 1
!$omp end target
if (gvar%myf%d(1).ne.1) stop 1
end program myprog
|