From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B8EE3858CDB; Mon, 8 Jan 2024 13:00:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B8EE3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704718851; bh=NmtdDazjurBLgRC4XjXBk0xCoSae31Qr0Wt71KeyPFY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xv0RiD1I3WrZpdbnPS7iei2tLuXvkIyUleh69fSXK6JbVEVe8hxF0rd2HEhjD3AJn +LDmPKrcTmssgcv37/K99YJ9rb645cGlA3cWPQFS1zLPepO1epgK2pPfMgYUZjk3SI zzGiYbDeT4VD44UHBg3jBzx1DMxQv1FpjflideEY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113120] during GIMPLE pass: bitintlower ICE: SIGSEGV with _BitInt() at -O2 Date: Mon, 08 Jan 2024 13:00:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D113120 --- Comment #3 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:efef8d7ff43c6c489fd6e7c52d71494d21324c87 commit r14-7001-gefef8d7ff43c6c489fd6e7c52d71494d21324c87 Author: Jakub Jelinek Date: Mon Jan 8 13:58:28 2024 +0100 lower-bitint: Fix up lowering of huge _BitInt 0 PHI args [PR113120] The PHI argument expansion of INTEGER_CSTs where bitint_min_cst_precisi= on returns significantly smaller precision than the PHI result precision is optimized by loading the much smaller constant (if any) from memory and then either setting the remaining limbs to {} or calling memset with -1. The case where no constant is loaded (i.e. c =3D=3D NULL) is when the INTEGER_CST is 0 or all_ones - in that case we can just set all the lim= bs to {} or call memset with -1 on everything. While for the all ones extension case that is what the code was already doing, I missed one spot in the zero extension case, where constricting the offset of the MEM_REF lhs of the =3D {} store it was using unconditionally the byte size of c, which obviously doesn't work if c is NULL. In that case we want to use zero offset. 2024-01-08 Jakub Jelinek PR tree-optimization/113120 * gimple-lower-bitint.cc (gimple_lower_bitint): Fix handling of very large _BitInt zero INTEGER_CST PHI argument. * gcc.dg/bitint-62.c: New test.=