repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-fortran
/
deep-copy-1.f90
blob
c4cea11b571b6ee33fb931096e4e10e1e51909f4
1
! { dg-do run }
2
3
! Test of attach/detach with "acc data".
4
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
12
13
type
(
mytype
) ::
var
14
15
allocate
(
var
%
a
(
1
:
n
))
16
17
!$acc data copy(var)
18
!$acc data copy(var%a)
19
20
!$acc parallel loop
21
do
i
=
1
,
n
22
var
%
a
(
i
) =
i
23
end do
24
!$acc end parallel loop
25
26
!$acc end data
27
!$acc end data
28
29
do
i
=
1
,
n
30
if
(
i
.
ne
.
var
%
a
(
i
))
stop
1
31
end do
32
33
deallocate
(
var
%
a
)
34
35
end program
dtype