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().