https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
Thomas Koenig changed:
What|Removed |Added
CC||tkoenig at gcc dot gnu.org
--- Comment #
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #15 from Joost VandeVondele
2013-03-29 09:11:10 UTC ---
*** Bug 50175 has been marked as a duplicate of this bug. ***
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #14 from Dmitry Vyukov 2012-12-29
22:36:11 UTC ---
(In reply to comment #13)
> (In reply to comment #12)
> > ws = gomp_ptrlock_get (&ws->next_ws);
>
> This is really just:
> ws = gomp_ptrlock_get (ws+offsetof(next_ws));
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #13 from Andrew Pinski 2012-12-29
21:32:06 UTC ---
(In reply to comment #12)
> ws = gomp_ptrlock_get (&ws->next_ws);
This is really just:
ws = gomp_ptrlock_get (ws+offsetof(next_ws));
So there are no loads there. This
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #12 from Dmitry Vyukov 2012-12-29
12:31:02 UTC ---
(In reply to comment #11)
> (In reply to comment #10)
> > gomp_ptrlock_get() function is not thread-safe. It's not only about
> > atomicity,
> > it's also about memory orderi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #11 from Andrew Pinski 2012-12-29
12:09:15 UTC ---
(In reply to comment #10)
> gomp_ptrlock_get() function is not thread-safe. It's not only about atomicity,
> it's also about memory ordering. Thread that calls gomp_ptrlock_set
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #10 from Dmitry Vyukov 2012-12-29
10:28:06 UTC ---
ThreadSanitizer says the same:
Testcase:
!$OMP PARALLEL PRIVATE(j)
j=OMP_GET_THREAD_NUM()
! no warnings without the dynamic schedule
!$OMP DO SCHEDULE(DYNAMIC,2)
DO i=1,10
ENDDO