https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63698
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Does the same problem still exist in _M_extract? This loop moves _M_nodes to the rightmost node again: while (_M_nodes->_M_right) _M_nodes = _M_nodes->_M_right; Can that node have an _M_left child?