https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65944
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The testcase is about not ICEing - eventually adding -nostdlib -r will still reproduce the original issue. Otherwise the fix is to properly "complete" the header parts of std::exception, maybe simply by including the appropriate headers.