From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F4EF3858C3A; Wed, 13 Mar 2024 09:20:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F4EF3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710321611; bh=Ggh9xXuU71bvp72DEgy5Wp1bgFqrY46MVKWq740ZxyM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AGzum6/33GYhFkukY0+1fhg56MVqllaPHntRHDhuMIeeYWSq4565po7SuZ44gZyhd +3SAc9hAwXnGCDrAnHlf3v3xljxkgG1tH7NKI6KdgPnsd1BOeI71DEn048YNinKBga UvJCvydAVXuAyf0d7tsJMw2kANft9hI09ug8yijw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114313] ICE: in limb_access_type, at gimple-lower-bitint.cc:591 with _BitInt() in a bitfield Date: Wed, 13 Mar 2024 09:20:08 +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: 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=3D114313 --- Comment #3 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:0613b12dd7f6274a1aac07f295ed51d86c2c85f1 commit r14-9447-g0613b12dd7f6274a1aac07f295ed51d86c2c85f1 Author: Jakub Jelinek Date: Wed Mar 13 10:19:04 2024 +0100 bitint: Fix up lowering of bitfield loads/stores [PR114313] The following testcase ICEs, because for large/huge _BitInt bitfield loads/stores we use the DECL_BIT_FIELD_REPRESENTATIVE as the underlying "var" and indexes into it can be larger than the precision of the bitfield might normally allow. The following patch fixes that by passing NULL_TREE type in that case to limb_access, so that we always return m_limb_type type and don't do the extra assertions, after all, the callers expect that too. I had to add the first hunk to avoid ICE, it was using type in one place even when it was NULL. But TYPE_SIZE (TREE_TYPE (var)) seems like the right size to use anyway because the code uses VIEW_CONVERT_EXPR on it. 2024-03-13 Jakub Jelinek PR middle-end/114313 * gimple-lower-bitint.cc (bitint_large_huge::limb_access): Use TYPE_SIZE of TREE_TYPE (var) rather than TYPE_SIZE of type. (bitint_large_huge::handle_load): Pass NULL_TREE rather than rhs_type to limb_access for the bitfield load cases. (bitint_large_huge::lower_mergeable_stmt): Pass NULL_TREE rather than lhs_type to limb_access if nlhs is non-NULL. * gcc.dg/torture/bitint-62.c: New test.=