https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65913
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu Oct 8 16:54:23 2015 New Revision: 228615 URL: https://gcc.gnu.org/viewcvs?rev=228615&root=gcc&view=rev Log: Backport PR libstdc++/65913 fix from mainline. Handle alignment in __atomic_is_lock_free gcc: 2015-09-17 Richard Henderson <r...@redhat.com> PR libstdc++/65913 * builtins.c (fold_builtin_atomic_always_lock_free): Handle fake pointers that encode the alignment of the object. libstdc++-v3: 2015-09-17 Jonathan Wakely <jwak...@redhat.com> PR libstdc++/65913 * include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(), __atomic_base<_PTp*>::is_lock_free()): Call the built-in with the immediate pointer value, not a variable. * include/std/atomic (atomic<T>::is_lock_free()): Likewise. * testsuite/29_atomics/atomic/65913.cc: New. Added: branches/gcc-5-branch/libstdc++-v3/testsuite/29_atomics/atomic/65913.cc Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/builtins.c branches/gcc-5-branch/libstdc++-v3/ChangeLog branches/gcc-5-branch/libstdc++-v3/include/bits/atomic_base.h branches/gcc-5-branch/libstdc++-v3/include/std/atomic