6 integer, allocatable
:: myarr(:,:)
10 type(mytype
), allocatable
:: typearr(:)
12 allocate(typearr(1:100))
15 allocate(typearr(i
)%myarr(1:100,1:100))
19 typearr(i
)%myarr(:,:) = 0
22 !$acc enter data copyin(typearr)
25 !$acc enter data copyin(typearr(i)%myarr)
29 typearr(i
)%myarr(:,:) = 50
31 !$acc update device(typearr(i)%myarr(:,:))
34 !$acc exit data copyout(typearr(i)%myarr)
37 !$acc exit data delete(typearr)
41 if (any(typearr(i
)%myarr
.ne
.50)) stop 1
43 if (any(typearr(i
)%myarr
.ne
.0)) stop 2
48 deallocate(typearr(i
)%myarr
)