https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114912
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What compiler version are you starting with? It could be that compiler is miscompiling stage 1 here; especially when it comes to C++ usage is becoming more and more.