]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/90557 fix path assignment that alters source
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 May 2019 22:36:21 +0000 (23:36 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 22 May 2019 22:36:21 +0000 (23:36 +0100)
commit14c551fccf8acc0622417bde59ee826e96b2a082
tree2992b187ed8c6ccb619ff7530a450b350ed657a9
parent6080857e5a5e4522b3ab67e4d30382ccc92cd6b9
PR libstdc++/90557 fix path assignment that alters source

Backport from mainline
2019-05-22  Jonathan Wakely  <jwakely@redhat.com>

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.

From-SVN: r271528
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/fs_path.cc
libstdc++-v3/testsuite/27_io/filesystem/path/assign/copy.cc
libstdc++-v3/testsuite/util/testsuite_fs.h