60ab4b449c
2014-07-13 Tobias Burnus <burnus@net-b.de> * testsuite/libgomp.fortran/pr34020.f90: Make compile with TS 18508/Fortran 2015 From-SVN: r212490
21 lines
397 B
Fortran
21 lines
397 B
Fortran
! PR fortran/34020
|
|
! { dg-do run }
|
|
|
|
subroutine atomic_add(lhs, rhs)
|
|
real lhs, rhs
|
|
!$omp atomic
|
|
lhs = rhs + lhs
|
|
end
|
|
|
|
external atomic_add
|
|
real lhs, rhs
|
|
integer i
|
|
lhs = 0
|
|
rhs = 1
|
|
!$omp parallel do num_threads(8) shared(lhs, rhs)
|
|
do i = 1, 300000
|
|
call atomic_add(lhs, rhs)
|
|
enddo
|
|
if (lhs .ne. 300000) call abort
|
|
end
|