summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-27 17:56:40 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-27 17:56:40 +0000
commitb6fbe6e80fdec2dba138b3c80613f27d16e30dfc (patch)
tree8e66713e0dddd1d10e775c31a3161cbaa010fc53 /libstdc++-v3
parentbbbf97b6a4548212019a6539c9be184f93a1059e (diff)
downloadppe42-gcc-b6fbe6e80fdec2dba138b3c80613f27d16e30dfc.tar.gz
ppe42-gcc-b6fbe6e80fdec2dba138b3c80613f27d16e30dfc.zip
PR libstdc++/59215
* include/bits/shared_ptr_base.h (_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic load. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 18012cb7507..da708305497 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-27 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/59215
+ * include/bits/shared_ptr_base.h
+ (_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic
+ load.
+
2014-01-27 Jason Merrill <jason@redhat.com>
Core DR 475
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 83724e4fbb1..1c3a47dfb6e 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_add_ref_lock()
{
// Perform lock-free add-if-not-zero operation.
- _Atomic_word __count = _M_use_count;
+ _Atomic_word __count = _M_get_use_count();
do
{
if (__count == 0)
OpenPOWER on IntegriCloud