This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r186396 - in /branches/gcc-4_6-branch/libstdc++...
- From: jyasskin at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 12 Apr 2012 22:26:03 -0000
- Subject: r186396 - in /branches/gcc-4_6-branch/libstdc++...
Author: jyasskin
Date: Thu Apr 12 22:26:02 2012
New Revision: 186396
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186396
Log:
Fix PR52822 by explicitly checking for object identity before
move-assigning. This is a simpler fix than was committed to 4.7 and
4.8.
2012-04-12 Jeffrey Yasskin <jyasskin@google.com>
PR libstdc++/52822
* include/bits/stl_algo.h (__stable_partition_adaptive): Avoid
move-assigning an object to itself by explicitly testing for
identity.
* testsuite/25_algorithms/stable_partition/pr52822.cc: Test
vectors, which have a destructive self-move-assignment.
* testsuite/25_algorithms/stable_partition/moveable.cc (test02):
Test with rvalstruct, which explicitly checks
self-move-assignment.
Added:
branches/gcc-4_6-branch/libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc
Modified:
branches/gcc-4_6-branch/libstdc++-v3/ChangeLog
branches/gcc-4_6-branch/libstdc++-v3/include/bits/stl_algo.h
branches/gcc-4_6-branch/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc