From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31C093858C60; Fri, 19 Jan 2024 09:02:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31C093858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705654949; bh=eCppTJ6MXKsClWWoZedl9KguMH1t8SpsQWnjQfkz7JM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vpjs/LsWln8i7VZBhPLMTC1qO1kfExaDEa7wHcZpg75U2HlFWqLoxtcyuBJiGzYCQ KX0L3hl7offEPoirNWBaiEVRu4M3C9ZGtJ0aqa6lpnIUYxwYDyRv3kaimnm7h/iQt6 k2uZcNStvcO0Jlv0k3sY1rNdOcCEsWuqsWv1Hsv8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113459] ICE: in as_a, at machmode.h:381 with memset() on a _BitInt() at -O1 and above Date: Fri, 19 Jan 2024 09:02:27 +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=3D113459 --- Comment #6 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:dcd5601c2b7298155c9a8e1bfb93ee8e952eca0b commit r14-8276-gdcd5601c2b7298155c9a8e1bfb93ee8e952eca0b Author: Jakub Jelinek Date: Fri Jan 19 10:00:16 2024 +0100 sccvn: Don't use SCALAR_INT_TYPE_MODE on BLKmode BITINT_TYPEs [PR113459] sccvn uses GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)) for INTEGER_TYPE= s, most likely because that is what native_{interpret,encode}_int used. This obviously doesn't work for larger BITINT_TYPEs which have BLKmode and the above ICEs on those. native_{interpret,encode}_int checks whet= her the BITINT_TYPE is medium/large/huge (i.e. an array of 2+ ABI limbs) and uses TYPE_SIZE_UNIT for that case, otherwise SCALAR_INT_TYPE_MODE l= ike for the INTEGER_TYPE case. The following patch instead just uses SCALAR_INT_TYPE_MODE for non-BLKm= ode TYPE_MODE and TYPE_SIZE_UNIT otherwise. 2024-01-19 Jakub Jelinek PR tree-optimization/113459 * tree-ssa-sccvn.cc (vn_walk_cb_data::push_partial_def): Use TREE_INT_CST_LOW of TYPE_SIZE_UNIT rather than GET_MODE_SIZE of SCALAR_INT_TYPE_MODE if type has BLKmode. (vn_reference_lookup_3): Likewise. Formatting fix. * gcc.dg/bitint-73.c: New test.=