From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 56027385702E; Wed, 26 Oct 2022 17:25:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56027385702E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666805119; bh=q1QosWUWs4h0XO3E6ssSMcQsP3bxFrXq6eMqJTNsZh0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y5tPuYeL8k5V5XbNq9R9F3rZ7UTKNHclQctXjArjYzbNwkTU1aTr1IL9vZp+ZjKE9 i7xXt+UXc09A0KXpgmDf6eDsuN2nnChqVlUmwCsqjfiL/JeDGMCi1KRbBeCbRaISGy G8UtVrVbe11AOzoWAzLyTkuV4tsKqLYe61aMvYZ4= From: "torbjorn.svensson at foss dot st.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/97684] [11 Regression] ICE in reg_preferred_class, at reginfo.c:789 by r11-4577 Date: Wed, 26 Oct 2022 17:25:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: torbjorn.svensson at foss dot st.com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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=3D97684 Torbj=C3=B6rn SVENSSON changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |torbjorn.svensson at foss = dot st.c | |om --- Comment #9 from Torbj=C3=B6rn SVENSSON --- In https://gcc.gnu.org/g:081c96621da658760b4a67c07530805f770fa22c, a regres= sion was introduced that causes GCC to segfault randomly. The regression is due to that resize_reg_info() is no longer called after remove_scratches() and remove_scratches() can increase the number of regist= ers. Due to the increase of number of registers in remove_scratches(), the resul= ting out-of-bounds usage of the reg_renumber global array will have unpredictable result. I sent a proposal patch to resolve this issue that can be reviewed here: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604295.html >From what I can tell, this regression exist in gcc-11, gcc-12 and master.=