From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22270 invoked by alias); 14 Aug 2014 06:17:36 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22245 invoked by uid 55); 14 Aug 2014 06:17:30 -0000 From: "thopre01 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/62103] Incorrect folding of bitfield in a union on big endian targets Date: Thu, 14 Aug 2014 06:17:00 -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: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thopre01 at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: thopre01 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00905.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62103 --- Comment #5 from thopre01 at gcc dot gnu.org --- Author: thopre01 Date: Thu Aug 14 06:16:56 2014 New Revision: 213941 URL: https://gcc.gnu.org/viewcvs?rev=213941&root=gcc&view=rev Log: 2014-08-14 Thomas Preud'homme Backport from mainline 2014-08-12 Thomas Preud'homme gcc/ PR middle-end/62103 * gimple-fold.c (fold_ctor_reference): Don't fold in presence of bitfields, that is when size doesn't match the size of type or the size of the constructor. gcc/testsuite/ PR middle-end/62103 * gcc.c-torture/execute/bitfld-6.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/gimple-fold.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog