http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59194

--- Comment #6 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 
---
(In reply to Jakub Jelinek from comment #4)
> I bet tsan complains because the load is
> not atomic, but does it really matter?  If we read garbage there, compare
> and swap will fail and next time we'll have hopefully correct value already
> from what compare and swap said was the previous value.

Actually, I believe this might fail. If the garbage read happens to be equal to
what a 3rd thread writes in the meanwhile (admittedly, small change), the
compare and swap will succeed and not fail.

Reply via email to