From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04B2F3860760; Wed, 26 Oct 2022 00:00:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04B2F3860760 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666742427; bh=fCJxdn2jT/+g1RdBBZxD/oqwm1YjP8b2NyDyGi2yenI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tFzJNTGHbhtptmDztin6o4W3BGzFJAva92JFjRbrgmgLquEjvRgSMT9Ke4nMQ3U5a aQcDJ9MN5BCcqznoKhtaQlJpoz4uIGKe1xGGOhzijl6AkOvh9B99cek579azzRAm+J l8QY5S+liqvwlJdt4lMXPBkNX0UDq00OBIlu5rdU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107403] uint64_t bitfield operation is mishandled Date: Wed, 26 Oct 2022 00:00:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D107403 --- Comment #1 from Andrew Pinski --- No this is correct. i.y << 8ULL Is all done in 56bit type as the type is greater than the size of int. Note c allows this behavior while c++ does not.=