https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67085
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu Jan 19 20:29:07 2017 New Revision: 244650 URL: https://gcc.gnu.org/viewcvs?rev=244650&root=gcc&view=rev Log: Fix unsafe moves inside loops PR libstdc++/67085 * include/bits/stl_heap.h (__is_heap): Use _GLIBCXX_MOVE. (__make_heap, __sort_heap): Don't use _GLIBCXX_MOVE inside loops. * testsuite/23_containers/priority_queue/67085.cc: Adjust expected number of copies. * testsuite/25_algorithms/make_heap/movable.cc: New test. Added: trunk/libstdc++-v3/testsuite/25_algorithms/make_heap/movable.cc - copied, changed from r244648, trunk/libstdc++-v3/testsuite/23_containers/priority_queue/67085.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/stl_heap.h trunk/libstdc++-v3/testsuite/23_containers/priority_queue/67085.cc