[Bug libstdc++/54786] Missing fence in std::atomic<T>::store() triggers wrong reordering.

ozabluda at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 2 22:04:00 GMT 2012


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

--- Comment #3 from Oleg Zabluda <ozabluda at gmail dot com> 2012-10-02 22:04:37 UTC ---
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().



More information about the Gcc-bugs mailing list