From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDE603858C20; Fri, 5 May 2023 17:33:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDE603858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683308009; bh=j9XsJ0XKGL5jKnEzfEexSYMXdl3GzC3GaKhfho7E59I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cr6IfLG6WNEhXHtFc7eon2LLpbsSFRuGV/GrmvVfj7TTDcbHZ9PJDhImH6+JD9n/5 x2iut+vBEjNufhz8/HLxXB90N4IcXDFLyYk+BpBWWgVjR7KtdhnMjzViWvXTOiKpw5 Cj9TncqYiVJYPzKBxNJAQqLtsTdBCb3xDw/gTULk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109750] Incorrect code generated for shifted bit field Date: Fri, 05 May 2023 17:33:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 9.4.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=3D109750 --- Comment #1 from Andrew Pinski --- ((UI64)source.sH.lower) The question is source.sH.lower promoted to int rather than the underlying type. Note clang has the same behavior as GCC here even. So I am thinking t= his is a bug in MSVC rather than GCC ... (or some implemented defined behavior = and both are correct).=