[Bug libgomp/42602] New: libgomp.fortran/recursion1.f90 aborted at random
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 4 04:36:00 GMT 2010
libgomp.fortran/recursion1.f90 aborted at random on Linux/Core i7.
There are
---
implicit none
integer :: i,s
s=0
!$omp parallel do private(i) shared(s)
do i=1,10
call sub(i)
end do
!$omp end parallel do
if (s/=55) call abort()
contains
subroutine sub (n)
integer :: n
s = s + n
print '(A,i3)',"loop =",n
end subroutine
end
---
's' isn't always 55. It has the value of the last running thread.
Does OpenMP guarantees that 's' will be 55?
--
Summary: libgomp.fortran/recursion1.f90 aborted at random
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42602
More information about the Gcc-bugs
mailing list