Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / deep-copy-1.f90
blobc4cea11b571b6ee33fb931096e4e10e1e51909f4
1 ! { dg-do run }
3 ! Test of attach/detach with "acc data".
5 program dtype
6 implicit none
7 integer, parameter :: n = 512
8 type mytype
9 integer, allocatable :: a(:)
10 end type mytype
11 integer i
13 type(mytype) :: var
15 allocate(var%a(1:n))
17 !$acc data copy(var)
18 !$acc data copy(var%a)
20 !$acc parallel loop
21 do i = 1,n
22 var%a(i) = i
23 end do
24 !$acc end parallel loop
26 !$acc end data
27 !$acc end data
29 do i = 1,n
30 if (i .ne. var%a(i)) stop 1
31 end do
33 deallocate(var%a)
35 end program dtype