https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96072
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |linkw at gcc dot gnu.org
Status|WAITING |NEW
--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed.
if (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap)
{
/* If the frame pointer was used then we can't delay emitting
a REG_CFA_DEF_CFA note. This must happen on the insn that
restores the frame pointer, r31. We may have already emitted
a REG_CFA_DEF_CFA note, but that's OK; A duplicate is
discarded by dwarf2cfi.cc/dwarf2out.cc, and in any case would
be harmless if emitted. */
if (frame_pointer_needed)
{
insn = get_last_insn ();
add_reg_note (insn, REG_CFA_DEF_CFA,
plus_constant (Pmode, frame_reg_rtx, frame_off));
RTX_FRAME_RELATED_P (insn) = 1;
}
ICE since the insn here is (rtx) 0x0.
I think the code here has the assumption that the frame pointer restoring
happened ahead, it's:
/* If we have a frame pointer, we can restore the old stack pointer
from it. */
else if (frame_pointer_needed_indeed)
{
frame_reg_rtx = sp_reg_rtx;
....