https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117751
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> --- (In reply to Sam James from comment #3) > Just -O1 -fwhole-program is enough, obviously. > > What I'm wondering is what's special here. Jakub is very thorough so either > missed it or something else is happening. Ah! It only fails with -D_GLIBCXX_ASSERTIONS (which is the default for me). -U_GLIBCXX_ASSERTIONS passes.