https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117751
--- Comment #3 from Sam James <sjames at gcc dot gnu.org> --- 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.