https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
--- Comment #2 from Mihai Preda <mpreda at gmail dot com> --- Adding -lstdc++fs fixes the problem with g++ 8.3 g++-9 does not segfault even without -lstdc++fs g++-9 --version g++-9 (Ubuntu 9-20190402-1ubuntu1) 9.0.1 20190402 (experimental) [trunk revision 270074]