4 integer, allocatable
:: A(:,:)
7 type(t
), allocatable
:: b(:)
13 allocate(b(i
)%A(1:20,1:20))
20 !$acc enter data copyin(b)
22 !$acc enter data copyin(b(i)%A)
27 !$acc update device(b(::2))
28 !$acc update device(b(1)%A(::3,::4))
31 !$acc exit data copyout(b(i)%A)
33 !$acc exit data copyout(b)
35 ! This is necessarily conservative because the "update" is allowed to copy
36 ! e.g. the whole of the containing block for a discontinuous update.
37 ! Try to ensure that the update covers a sufficient portion of the array.
39 if (any(b(1)%A(::3,::4) .ne
. 5)) stop 1
41 if (any(b(i
)%A(:,:) .ne
. 0)) stop 2