re PR c++/60272 (atomic<>::compare_exchange_weak has spurious store and can cause...
authorRichard Henderson <rth@redhat.com>
Thu, 20 Feb 2014 17:43:53 +0000 (09:43 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 20 Feb 2014 17:43:53 +0000 (09:43 -0800)
commit672ce9397b78c077e21d785a2ddf9fffd51a1952
tree8ec4b08823b9b5486cecde9c93f376b7f59cf42e
parent95ce7613d537f5a3e9e36da0ca6aa752f60da8e0
re PR c++/60272 (atomic<>::compare_exchange_weak has spurious store and can cause race conditions)

PR c++/60272

gcc/
* builtins.c (expand_builtin_atomic_compare_exchange): Conditionalize
on failure the store back into EXPECT.
libatomic/
* cas_n.c (libat_compare_exchange): Conditionalize on failure
the store back to EPTR.

From-SVN: r207966
gcc/ChangeLog
gcc/builtins.c
libatomic/ChangeLog
libatomic/cas_n.c