https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96484
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:8b7e7fcb5fff8255122a8fa94109f7ae05aeaa81 commit r10-8581-g8b7e7fcb5fff8255122a8fa94109f7ae05aeaa81 Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Aug 6 18:44:50 2020 +0100 libstdc++: Fix unnecessary allocations in read_symlink [PR 96484] libstdc++-v3/ChangeLog: PR libstdc++/96484 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error immediately for non-symlinks. * src/filesystem/ops.cc (fs::read_symlink): Likewise. (cherry picked from commit 6a13a4e3f29fc4ce5eff96d74ba965c9fdc02184)