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
/
optional-data-copyin-by-value.f90
blob
8e842980863857dd4d7dadc327fb0734a4d2a126
1
! Test OpenACC data regions with optional arguments passed by value.
2
3
! { dg-do run }
4
5
program
test
6
implicit none
7
8
integer
::
res
9
10
if
(
foo
(
27
) .
ne
.
27
)
stop
1
11
if
(
foo
(
16
,
18
) .
ne
.
288
)
stop
2
12
contains
13
function
foo
(
x
,
y
)
14
integer
,
value
::
x
15
integer
,
value
,
optional
::
y
16
integer
::
res
,
foo
17
18
!$acc data copyin(x, y) copyout(res)
19
!$acc parallel
20
res
=
x
21
if
(
present
(
y
))
then
22
res
=
res
*
y
23
end if
24
!$acc end parallel
25
!$acc end data
26
27
foo
=
res
28
end function
foo
29
end program
test