From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A34753858438; Wed, 14 Sep 2022 12:23:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A34753858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663158220; bh=qklsv2qf6hbxOuAhmvMP7KStque7RkUCpsY4gGVL6Z8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vhe2c9wE29QbzT9U9iWMPCrqZmLOZmFM1+WjP7HvcM8k2Tcnz+ClJ16H6+/xwu8ET 8oyiHSwhc/Uj3NRpepgzaK0i4Iy/Z0NYFv0XTp0F7mjdWV1KgxocitylCn8mfPhjjK rOYDFOJ514NiSx1MYo0HBdEap8Ay1Bd0Ugj1Y5ZU= From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96072] ICE: Segmentation fault (in add_reg_note) Date: Wed, 14 Sep 2022 12:23:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96072 Kewen Lin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bergner at gcc dot gnu.org --- Comment #6 from Kewen Lin --- diff --git a/gcc/config/rs6000/rs6000-logue.cc b/gcc/config/rs6000/rs6000-logue.cc index 59fe1c8cb8b..a868ede24fb 100644 --- a/gcc/config/rs6000/rs6000-logue.cc +++ b/gcc/config/rs6000/rs6000-logue.cc @@ -4924,7 +4924,7 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_typ= e) 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) + if (frame_pointer_needed_indeed) { insn =3D get_last_insn (); add_reg_note (insn, REG_CFA_DEF_CFA, The above diff can fix the issue, I think it's related to commit r10-7981, which introduced frame_pointer_needed_indeed but missed to update the condi= tion for adding reg note under new flag.=