111
|
1 ! { dg-do run }
|
|
2 ! { dg-additional-options "-cpp" }
|
|
3
|
|
4 program test
|
|
5 implicit none
|
|
6
|
|
7 integer, target :: i, arr(1000)
|
|
8 integer, pointer :: ip, iph
|
|
9 integer, contiguous, pointer :: parr(:), parrh(:)
|
|
10
|
|
11 ! Assign the same targets
|
|
12 ip => i
|
|
13 parr => arr
|
|
14 iph => i
|
|
15 parrh => arr
|
|
16
|
|
17 !$acc data copyin(i, arr)
|
|
18 !$acc host_data use_device(ip, parr)
|
|
19
|
|
20 ! Test how the pointers compare inside a host_data construct
|
|
21 #if ACC_MEM_SHARED
|
131
|
22 if (.not. associated(ip, iph)) STOP 1
|
|
23 if (.not. associated(parr, parrh)) STOP 2
|
111
|
24 #else
|
131
|
25 if (associated(ip, iph)) STOP 3
|
|
26 if (associated(parr, parrh)) STOP 4
|
111
|
27 #endif
|
|
28
|
|
29 !$acc end host_data
|
|
30 !$acc end data
|
|
31
|
|
32 end program test
|