Debian Codegraph @

libgomp/testsuite/libgomp.oacc-fortran/derivedtype-1.f95

raw
1 ! { dg-do run }
2
3 program main
4 implicit none
5
6 type mytype
7 integer :: a, b, c
8 end type mytype
9
10 type(mytype) :: myvar
11 integer :: i
12
13 myvar%a = 0
14 myvar%b = 0
15 myvar%c = 0
16
17 !$acc enter data copyin(myvar)
18
19 !$acc parallel present(myvar)
20 myvar%a = 1
21 myvar%b = 2
22 myvar%c = 3
23 !$acc end parallel
24
25 !$acc exit data copyout(myvar)
26
27 if (myvar%a .ne. 1) stop 1
28 if (myvar%b .ne. 2) stop 2
29 if (myvar%c .ne. 3) stop 3
30 end program main