From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9732 invoked by alias); 3 Nov 2004 17:51:55 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9721 invoked by uid 48); 3 Nov 2004 17:51:54 -0000 Date: Wed, 03 Nov 2004 17:51:00 -0000 From: "ebotcazou at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20041103175151.18287.ebotcazou@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/18287] New: Unaligned access to fields inside packed records X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg00363.txt.bz2 List-Id: The testcase I'm about to attach generates a bug error at runtime on the SPARC (and very likely on any other STRICT_ALIGNMENT target). Verified with 2.95.3, 3.3.x, 3.4.x and 4.0pre. I think the front-end wrongly turns ADDR_EXPR> into PLUS_EXPR whatever the alignment of the field. For reference, the Ada front-end doesn't do the simplification and lets the middle-end generate the temporary if required. -- Summary: Unaligned access to fields inside packed records Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ebotcazou at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: *-*-* GCC host triplet: *-*-* GCC target triplet: *-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18287