[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

torvald at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 9 10:11:00 GMT 2015


--- Comment #6 from torvald at gcc dot gnu.org ---
(In reply to torvald from comment #5)
> (In reply to Matthew Wahab from comment #0)
> > while a __sync full
> > barrier should block all movement
> > (https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.
> > html#_005f_005fsync-Builtins).
> But in your code example below, you didn't use __synch_synchronize.  The
> other __sync operations do not document that they are a full barrier,
> AFAICS.  (I'm not sure whether there is a wide assumption that they do.)

No, you're right.  They are "in most cases" considered to be a full barrier.

More information about the Gcc-bugs mailing list