https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42176
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Bug 30915 is similar, and the problem was related to gentoo-specific patches to glibc. Possibly caused by A mismatched combination of libstdc++ and glibc. I've never been able to reproduce it, and I don't think it's a GCC problem, so I agree with closing this. Thanks, Martin.