https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110924
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- 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); } }