From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 829B1385842B; Sat, 24 Feb 2024 06:40:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 829B1385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708756809; bh=AX4m9K9meImVCvWI5mT7B7chaM6tcfSxFs8PYBH2Jv8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pYZhnKFGHmBBog/FvfLJPKA6iPHvXkxMo9bognOrqsHE0hiwOHlBUIpqCue7m+9gD LKU4py3N4OdpzaQqM2R4N1ES4XYtS6NwN2WFR1mkUZPNBeznSB372jhGs/IVLqKxQt zPjN59O8uKfK3pcNdfkOJtZ9JzuXCArZ3kt4WByE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114084] ICE: SIGSEGV: infinite recursion in fold_build2_loc / fold_binary_loc with _BitInt(127) Date: Sat, 24 Feb 2024 06:40:07 +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: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D114084 --- Comment #2 from Andrew Pinski --- Here is another testcase, the only use of _BitInt is in the cast, everything else is a bitfield: ``` struct a { unsigned t:(sizeof(int)*8-1); }; typedef unsigned _BitInt(sizeof(int)*8-1) ub31; struct a ub63_0; struct a ub63_1; void foo (void) { ub63_1.t =3D (ub31) ((ub63_0.t | (-1u>>1) ) >> 1 | (ub63_0.t | 1u) << 4); } ``` I still can't figure out why the cast is needed though.=