From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 56372385E004; Tue, 22 Mar 2022 21:44:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56372385E004 From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104894] [11/12 Regression] ICE with -fno-plt -mcpu=power10 on PowerPC64 LE Linux Date: Tue, 22 Mar 2022 21:44:05 +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.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner 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: 11.3 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2022 21:44:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104894 Peter Bergner changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bergner at gcc dot gnu.org, | |meissner at gcc dot gnu.org --- Comment #3 from Peter Bergner --- (In reply to Alan Modra from comment #1) > Likely "gcc_assert (INTVAL (cookie) =3D=3D 0);" in > rs6000_sibcall_aix can just be deleted. I think it's still useful to ensure we have a valid sibcall. The problem is that with pcrel, we have more opportunities to do a sibcall than we did bef= ore, meaning it doesn't matter if the callee has the same TOC value as us, since= we don't use it. I think we just need to relax the assert when the caller is pcrel. The following fixes the ICE and I'm putting it through a bootstrap & regtest cycle. diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index a7645820b1e..fc5cfeac4fa 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -25659,7 +25659,7 @@ rs6000_sibcall_aix (rtx value, rtx func_desc, rtx tlsarg, rtx cookie) rtx r12 =3D NULL_RTX; rtx func_addr =3D func_desc; - gcc_assert (INTVAL (cookie) =3D=3D 0); + gcc_assert (rs6000_pcrel_p () || INTVAL (cookie) =3D=3D 0); if (global_tlsarg) tlsarg =3D global_tlsarg;=