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
Explain gfortran-dg-runtest usage in libgomp Fortran testing.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.fortran
/
task1.f90
blob
df57cb8316897a2d766efb9bf2203342b6da83a8
1
! { dg-do run }
2
3
program
tasktest
4
use
omp_lib
5
integer
::
i
,
j
6
common
/
tasktest_j
/
j
7
j
=
0
8
!$omp parallel private (i)
9
i
=
omp_get_thread_num
()
10
if
(
i
.
lt
.2
)
then
11
!$omp task if (.false.) default(firstprivate)
12
call
subr
(
i
+
1
)
13
!$omp end task
14
end if
15
!$omp end parallel
16
if
(
j
.
gt
.0
)
call
abort
17
contains
18
subroutine
subr
(
i
)
19
use
omp_lib
20
integer
::
i
,
j
21
common
/
tasktest_j
/
j
22
if
(
omp_get_thread_num
().
ne
.(
i
-
1
))
then
23
!$omp atomic
24
j
=
j
+
1
25
end if
26
end subroutine
subr
27
end program
tasktest