http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60038
--- Comment #14 from Kostya Serebryany <kcc at gcc dot gnu.org> --- Landed upstream: http://llvm.org/viewvc/llvm-project?view=revision&revision=200733 Note that the patch is slightly different from Jakub's: it uses memory_order_relaxed. My understanding is that now is not the best time to do full merge from upstream, so feel free to commit this patch to GCC separately.