https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98220
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> --- No it's, not a bug, because the C++ standard says the order is unspecified. The compiler is allowed to reorder them, and that's what happens with -flto.