From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31945 invoked by alias); 8 Jan 2013 15:07:45 -0000 Received: (qmail 31830 invoked by uid 48); 8 Jan 2013 15:07:18 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/55882] unaligned load/store : incorrect struct offset Date: Tue, 08 Jan 2013 15:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2013-01/txt/msg00657.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55882 --- Comment #5 from Richard Biener 2013-01-08 15:07:16 UTC --- (In reply to comment #3) > > 00000000 : 00000000 : > ... > 20: 03c21021 addu v0,s8,v0 20: 03c21021 addu v0,s8,v0 > > 24: 8c44000c lw a0,12(v0) | 24: 8c44000a lw a0,10(v0) > > 28: 3c03000f lui v1,0xf | 28: 3c03ffff lui v1,0xffff > 2c: 3463ffff ori v1,v1,0xffff | 2c: 3463000f ori v1,v1,0xf > 30: 00831824 and v1,a0,v1 30: 00831824 and v1,a0,v1 > > 34: ac43000c sw v1,12(v0) | 34: ac43000a sw v1,10(v0) > > 38: 03c0e82d move sp,s8 38: 03c0e82d move sp,s8 > 3c: 8fbe03ec lw s8,1004(sp) 3c: 8fbe03ec lw s8,1004(sp) > 40: 27bd03f0 addiu sp,sp,1008 40: 27bd03f0 addiu sp,sp,1008 > 44: 03e00008 jr ra 44: 03e00008 jr ra > 48: 00000000 nop 48: 00000000 nop I believe the right side is correct. use_alt_rd_dqs is at offset 10 (enable_monitor at 0, step_out_pointer at 2, hold_out_pointer at 4, etc.). Depending on enum behavior on mips (-fshort-enums?) mystruct is aligned to two bytes. Can you post -v output of the compile? I'm trying to reproduce with a cross to mips-elf now.