From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7B8B43857C44; Tue, 12 Sep 2023 10:24:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B8B43857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694514293; bh=5Y3/4Z35w4jBmN2CS/+jNkaIGCe2SfbLHfP6tpmBCek=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jyzx1RWziGr0GFqykwNpkwg71O7UTKIuPxnZFm0oNFc+Q/IP6OBxznAMZ5ICtXXXn a2f9OLBE1UuZRi6KgQwrmvsfV9zLSBWcTjyQ35nsemvhPOdaBH19adWbEL1LtHP1sl lx1J0j5UBZiQaIp45Miqc2tdbdOBKmA5hjvW+S0E= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111338] [14 Regression] ice in vn_walk_cb_data Date: Tue, 12 Sep 2023 10:24:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: 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: 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=3D111338 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:6067dbdcf77df995129214248f062d9ce18b48d8 commit r14-3875-g6067dbdcf77df995129214248f062d9ce18b48d8 Author: Jakub Jelinek Date: Tue Sep 12 12:23:13 2023 +0200 sccvn: Avoid ICEs on _BitInt load BIT_AND_EXPR mask [PR111338] The following testcase ICEs, because vn_walk_cb_data::push_partial_def uses a fixed size buffer (64 target bytes) for its construction/deconstruction of partial stores and fails if larger preci= sion than that is needed, and the PR93582 changes assert push_partial_def succeeds (and check the various other conditions much earlier when seei= ng the BIT_AND_EXPR statement, like CHAR_BIT =3D=3D 8, BITS_PER_UNIT =3D= =3D 8, BYTES_BIG_ENDIAN =3D=3D WORDS_BIG_ENDIAN, etc.). So, just removing the= assert and allowing it fail there doesn't really work and ICEs later on. The following patch moves the bufsize out of the method and tests it together with the other checks. BTW, perhaps we could increase the bufsize as well or in addition to increasing it make the buffer allocated using XALLOCAVEC, but still I t= hink it is useful to have some upper bound and so I think this patch is usef= ul even in that case. 2023-09-12 Jakub Jelinek PR middle-end/111338 * tree-ssa-sccvn.cc (struct vn_walk_cb_data): Add bufsize non-static data member. (vn_walk_cb_data::push_partial_def): Remove bufsize variable. (visit_nary_op): Avoid the BIT_AND_EXPR with constant rhs2 optimization if type's precision is too large for vn_walk_cb_data::bufsize. * gcc.dg/bitint-37.c: New test.=