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
Support -std=f2018
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.fortran
/
pr34020.f90
blob
39f7046d1975602580bf4cbfa919f000770d9bc2
1
! PR fortran/34020
2
! { dg-do run }
3
4
subroutine
atomic_add
(
lhs
,
rhs
)
5
real
lhs
,
rhs
6
!$omp atomic
7
lhs
=
rhs
+
lhs
8
end
9
10
external
atomic_add
11
real
lhs
,
rhs
12
integer
i
13
lhs
=
0
14
rhs
=
1
15
!$omp parallel do num_threads(8) shared(lhs, rhs)
16
do
i
=
1
,
300000
17
call
atomic_add
(
lhs
,
rhs
)
18
enddo
19
if
(
lhs
.
ne
.
300000
)
call
abort
20
end