This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/55041] prettyprinting/shared_ptr & cxx11 fails on some platforms


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]