From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F94C3858C52; Thu, 14 Sep 2023 18:41:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F94C3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694716865; bh=SE+Tpg3ck28cE+thRbTSZfthCQ3NHiRqFVmEDEaqHf4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MyjVWrqN6Y5kXLRgUokfZdExogiKybMnqULopXYDFQGqc3uwFvKolX5j/Y6u1mpUj Cg2u7vxWOG0hSW6v6DJO1Ot878mw8XDTLxv7gGma1xrWrbvyYX6gYRWfxjSMQIHKkl 2mTHyjv4nG1/Jv5rd7kL/h6NMDwtUGyD1ZouSpE8= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong Date: Thu, 14 Sep 2023 18:41:04 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D111411 --- Comment #7 from Richard Sandiford --- It's proving difficult to generate a reliable reproducer from pure C code, due to the ways in which we handle out-of-range offsets. But FWIW, here's one that uses the RTL frontend, compiled with -O -fdisable-rtl-postreload -fpeephole2: extern int data[]; void __RTL (startwith ("ira")) foo (void *ptr) { (function "foo" (param "ptr" (DECL_RTL (reg/v:DI <0> [ ptr ])) (DECL_RTL_INCOMING (reg/v:DI x0 [ ptr ])) ) ;; param "ptr" (insn-chain (block 2 (edge-from entry (flags "FALLTHRU")) (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) (insn 4 (set (reg:DI <0>) (reg:DI x0))) (insn 5 (set (reg:DI <1>) (plus:DI (reg:DI <0>) (const_int 768)))) (insn 6 (set (mem:SI (plus:DI (reg:DI <0>) (const_int 508)) [1 &data+508 S4 A4]) (const_int 0))) (insn 7 (set (mem:SI (plus:DI (reg:DI <1>) (const_int -256)) [1 &data+512 S4 A4]) (const_int 0))) (edge-to exit (flags "FALLTHRU")) ) ;; block 2 ) ;; insn-chain ) ;; function } (This one doesn't rely on -fstack-protector-strong, or on the recent patches.) The problem is that the LDP/STP formation code is too loose in the check for valid addresses: it thinks it's enough for the second address to be valid, even though that's not the one used in the STP.=