https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110924
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #11) > Variant (1) is just the following, but I'm unsure as to the possible effects > of that ... (test coverage will be very low anyway) > > diff --git a/gcc/tree-ssa-operands.cc b//gcc/tree-ssa-operands.cc > index 57e393ae164..c8ac98b4e06 100644 > --- a/gcc/tree-ssa-operands.cc > +++ b/gcc/tree-ssa-operands.cc > @@ -696,7 +696,8 @@ operands_scanner::maybe_add_call_vops (gcall *stmt) > /* A 'pure' or a 'const' function never call-clobbers anything. */ > if (!(call_flags & (ECF_PURE | ECF_CONST))) > add_virtual_operand (opf_def); > - else if (!(call_flags & ECF_CONST)) > + else if (!(call_flags & ECF_CONST) > + || (call_flags & ECF_NORETURN)) > add_virtual_operand (opf_use); > } > } That ICEs for example tree-ssa/cunroll-4.c because that inserts __builtin_unreachable () calls and this function is explicitly marked const noreturn (if you use that combo manually you get a diagnostic). The ICE is because cunroll doesn't add virtual operands or updates SSA. But it also shows that sinking into __builtin_unreachable () ending regions will have the same issue and the ipa pure-const/modref fix won't fix that. I'm going to try fixing the live problem :/