https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105469
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I can reproduce what you observe with -O3 -fwhole-program -fsanitize=unreachable (without the sanitize it gets into an infinite loop). -fno-ipa-cp-clone avoids the issue (whatever it is exactly). Can you attach un-preprocessed source as well? You seem to be not using any non-standard header files.