[Bug libstdc++/54786] Missing fence in std::atomic<T>::store() triggers wrong reordering.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 3 00:56:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54786
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-10-03 00:56:25 UTC ---
(In reply to comment #3)
> I can confirm that it is fixed in 4.7.0, after the move to __atomic builtins,
> at least on x86_64. It would be nice to have it fixed in currently hypothetical
> 4.6.4, especially for those whose distro is stuck on 4.6. But at least it's
> documented now and users can act accordingly. For example add
> __sync_syncronise() or asm volatile ("":::"memory") before atomic::store().
Considering this is in an experimental part of the compiler (stdc++0x is
consider experimental for 4.6), I say you are out of luck from support from the
FSF. You can request your distro to have the fix backported though.
More information about the Gcc-bugs
mailing list