This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/54786] Missing fence in std::atomic<T>::store() triggers wrong reordering.
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 03 Oct 2012 00:56:25 +0000
- Subject: [Bug libstdc++/54786] Missing fence in std::atomic<T>::store() triggers wrong reordering.
- Auto-submitted: auto-generated
- References: <bug-54786-4@http.gcc.gnu.org/bugzilla/>
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.