From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 621E7385B835; Fri, 17 Apr 2020 05:34:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 621E7385B835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587101676; bh=LTp+Nlp4ejNJ366RzFJYsf95ztXFZrK7YxtgRwm/1x0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IuS6XYRdPa8++7zlolSwXVmjAyFO5KN6+w4q0PPb5R2x9HesVlIKbgpSO/B6X5Nfy llhSQvzZVIDK/t46tKmX6x5tLJ+Wcd0NMp6FWyzWwtMqeiZhVF+o/oTEC/3itwqpdX b4Zq0+OMabCc/dc7m8txvsVFaNUIKYKf3YsHRFk0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94631] Wrong codegen for arithmetic on bitfields Date: Fri, 17 Apr 2020 05:34:36 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 05:34:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94631 --- Comment #3 from Andrew Pinski --- (In reply to Rich Felker from comment #2) > So basically the outcome of DR120 was allowing the GCC behavior? It still > seems like a bad thing, not required, and likely to produce exploitable b= ugs > (due to truncation of arithmetic) as well as very poor-performance code (= due > to constant masking). Note this only matters when the size of the bit-field is less than the size= of int.=