https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106099
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- And there is another thing, we need to check all these gimple_build_builtin_unreachable and builtin_decl_unreachable and build_builtin_unreachable calls and check if any of them aren't done during IPA with the assumed new caller not being set as cfun. Because those functions test flag_* etc. vars and if there would be such calls, we'd need to pass struct function * and use opts_for_fn instead of flag_*.