http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53263
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-07 12:54:36 UTC --- I see, I see. First, I notice that we don't have a specific debug/ version of it, thus you are using the normal version + debug-mode std::vector and std::????_heap algorithms as implementation details. Likely the latter are the problem, I think we already noticed somewhere that std::push_heap & company check a lot, check at every step that a proper heap is passed, but I don't remember the outcome of that discussion.