From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17536 invoked by alias); 3 Nov 2004 18:02:20 -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 17518 invoked by uid 48); 3 Nov 2004 18:02:19 -0000 Date: Wed, 03 Nov 2004 18:02:00 -0000 Message-ID: <20041103180219.17517.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041103175151.18287.ebotcazou@gcc.gnu.org> References: <20041103175151.18287.ebotcazou@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/18287] Unaligned access to fields inside packed records X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg00365.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-03 18:02 ------- Are you sure that 4.0.0 does not work, as it no longer does the transformation for &(a->b) into a + offsetof(a,b). >>From the last tree dump for 4.0.0: ;; Function Assign_Hour_Of (Assign_Hour_Of) Assign_Hour_Of (t) { : t->Hour = 44; return; } ;; Function Clobber_Hour_Of (Clobber_Hour_Of) Clobber_Hour_Of (dt) { struct Time_T * D.1128; : D.1128 = &dt->Time; Assign_Hour_Of (D.1128); return; } ;; Function main (main) main () { struct Date_And_Time_T dt; int D.1135; : dt.Time.Hour = 22; Clobber_Hour_Of (&dt); D.1135 = 0; return D.1135; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18287