This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/55041] prettyprinting/shared_ptr & cxx11 fails on some platforms
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 28 Oct 2012 13:27:20 +0000
- Subject: [Bug libstdc++/55041] prettyprinting/shared_ptr & cxx11 fails on some platforms
- Auto-submitted: auto-generated
- References: <bug-55041-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55041
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-28 13:27:20 UTC ---
The shared_ptr tests fail because GDB is getting the variable's type wrong,
seeing it as the base class not the correct type:
(gdb) p sp1
$1 = {<std::__shared_ptr<int, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr =
0x12345678, _M_refcount = {_M_pi = 0x604010}}, <No data fields>}
(gdb) p wp1
$2 = {<std::__weak_ptr<int, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr =
0x12344321, _M_refcount = {_M_pi = 0x604040}}, <No data fields>}
(gdb) p wp2
$3 = {<std::__weak_ptr<int, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr =
0x56788765, _M_refcount = {_M_pi = 0x604070}}, <No data fields>}
(gdb) p/r wp2
$4 = {<std::__weak_ptr<int, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr =
0x56788765, _M_refcount = {_M_pi = 0x604070}}, <No data fields>}
(gdb) p/r sp1
$5 = {<std::__shared_ptr<int, (__gnu_cxx::_Lock_policy)2>> = {_M_ptr =
0x12345678, _M_refcount = {_M_pi = 0x604010}}, <No data fields>}
This doesn't look like a libstdc++ problem.