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
Daily bump.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-fortran
/
routine-3.f90
blob
d233a63ee5ac3a38809cdc8cdc47c91ed6246e9e
1
! { dg-do run }
2
! { dg-options "-fno-inline" }
3
4
integer
,
parameter
::
n
=
10
5
integer
::
a
(
n
),
i
6
integer
,
external
::
fact
7
!$acc routine (fact)
8
!$acc parallel
9
!$acc loop
10
do
i
=
1
,
n
11
a
(
i
) =
fact
(
i
)
12
end do
13
!$acc end parallel
14
do
i
=
1
,
n
15
if
(
a
(
i
) .
ne
.
fact
(
i
))
call
abort
16
end do
17
end
18
recursive function
fact
(
x
)
result
(
res
)
19
!$acc routine
20
integer
,
intent
(
in
) ::
x
21
integer
::
res
22
if
(
x
<
1
)
then
23
res
=
1
24
else
25
res
=
x
*
fact
(
x
-
1
)
26
end if
27
end function
fact