PR libstdc++/90634 * src/filesystem/path.cc (path::_M_split_cmpts()): Fix check for "/". * testsuite/27_io/filesystem/path/construct/90634.cc: New test. * testsuite/experimental/filesystem/path/construct/90634.cc: New test. PR libstdc++/90634 * include/bits/fs_path.h (path::path(path&&)): Only call _M_split_cmpts() for a path with multiple components. (path::_S_is_dir_sep()): Add missing 'static' keyword to function. * include/experimental/bits/fs_path.h: Likewise. * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of components and reserve space in vector. Return early when there is only one component. * src/filesystem/std-path.cc (path::_M_split_cmpts()): Likewise. Tested x86_64-linux, committed to gcc-8-branch.