[PATCH] PR libstdc++/90557 fix path assignment that alters source

Jonathan Wakely jwakely@redhat.com
Tue May 28 19:43:00 GMT 2019


On 22/05/19 23:14 +0100, Jonathan Wakely wrote:
>	PR libstdc++/90557
>	* src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
>	reversed arguments to uninitialized_copy_n.
>	* testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
>	is unchanged by copy assignment.
>	* testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
>	compare path components.

I should have used the three-argument version of std::equal, because
the four-argument one is not available in C++11.

Fixed with this patch, tested powerpc64le-linux and committed to
trunk. This needs to be backported togcc-9-branch too.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1078 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190528/efb4009d/attachment.bin>


More information about the Gcc-patches mailing list