optimization/4061: Optimization bug in arm-unknown-elf cross-build of gcc 3.1

rearnsha@gcc.gnu.org rearnsha@gcc.gnu.org
Mon Aug 20 07:44:00 GMT 2001


Synopsis: Optimization bug in arm-unknown-elf cross-build of gcc 3.1

Responsible-Changed-From-To: unassigned->rearnsha
Responsible-Changed-By: rearnsha
Responsible-Changed-When: Mon Aug 20 07:44:20 2001
Responsible-Changed-Why:
    mine
State-Changed-From-To: open->closed
State-Changed-By: rearnsha
State-Changed-When: Mon Aug 20 07:44:20 2001
State-Changed-Why:
    Not a bug.  You are assuming that because your structure contains
    only char type elements that it will be only byte-aligned.
    This assumption is incorrect on the ARM, where structures are
    always word-aligned by default.
    
    You can fix the problem by adding __attribute__((packed)) at the end
    of your structure declaration.  See the manual for more details.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4061&database=gcc



More information about the Gcc-bugs mailing list