public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/42602]  New: libgomp.fortran/recursion1.f90 aborted at random
@ 2010-01-04  4:36 hjl dot tools at gmail dot com
  2010-01-04  8:02 ` [Bug libgomp/42602] " jakub at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-01-04  4:36 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-04 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04  4:36 [Bug libgomp/42602] New: libgomp.fortran/recursion1.f90 aborted at random hjl dot tools at gmail dot com
2010-01-04  8:02 ` [Bug libgomp/42602] " jakub at gcc dot gnu dot org
2010-01-04 14:22 ` hjl dot tools at gmail dot com
2010-01-04 14:22 ` hjl dot tools at gmail dot com
2010-01-04 14:28 ` [Bug libgomp/42602] [4.5 Regression] " hjl at gcc dot gnu dot org
2010-01-04 18:39 ` hjl dot tools at gmail dot com
2010-01-04 22:37 ` hjl dot tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).