Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / array-stride-dt-1.f90
blobf04d76d583abfe21c4d39de0f67de42138ea5065
1 ! { dg-do run }
3 type t
4 integer, allocatable :: A(:,:)
5 end type t
7 type(t), allocatable :: b(:)
9 integer :: i
11 allocate(b(1:20))
12 do i=1,20
13 allocate(b(i)%A(1:20,1:20))
14 end do
16 do i=1,20
17 b(i)%A(:,:) = 0
18 end do
20 !$acc enter data copyin(b)
21 do i=1,20
22 !$acc enter data copyin(b(i)%A)
23 end do
25 b(1)%A(:,:) = 5
27 !$acc update device(b(::2))
28 !$acc update device(b(1)%A(::3,::4))
30 do i=1,20
31 !$acc exit data copyout(b(i)%A)
32 end do
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
40 do i=2,20
41 if (any(b(i)%A(:,:) .ne. 0)) stop 2
42 end do
44 end