https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90418
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #3) > (In reply to Iain Sandoe from comment #2) > > (In reply to Jakub Jelinek from comment #1) > Though, I don't understand why that > if (DEFAULT_ABI == ABI_DARWIN && crtl->calls_eh_return) return false; > wouldn't work in rs6000_function_ok_for_sibcall, because that conditional > should make sure we don't have any tail calls in such functions and thus the > above shouldn't trigger. Agreed, and that's exactly the code I have present, and I just did a clean build. However, as you suspect the sibcall is still present. Perhaps crtl->calls_eh_return is not somehow set or somehow a sib call is generated without checking it's OK. Will look more later. (call_insn/j 16 14 17 3 (parallel [ (set (reg:SI 3 r3) (call (mem:SI (symbol_ref:SI ("_Unwind_RaiseException") [flags 0x403] <function_decl 0x2922e80 _Unwind_RaiseException>) [0 _Unwind_RaiseException S4 A8]) (const_int 32 [0x20]))) (use (const_int 0 [0])) (simple_return) ]) "/src-local/gcc-git/libgcc/unwind.inc":264:12 682 {*sibcall_value_local32} (expr_list:REG_CALL_DECL (symbol_ref:SI ("_Unwind_RaiseException") [flags 0x403] <function_decl 0x2922e80 _Unwind_RaiseException>) (nil)) (expr_list:SI (use (reg:SI 3 r3)) (nil)))