https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64789
Bug ID: 64789 Summary: gcc generates unreliable code on arm with -mstructure-size-boundary=32 Product: gcc Version: 4.8.3 Status: RESOLVED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: mittorn at sibmail dot com Status: RESOLVED Resolution: INVALID After rebuilding many of system libraries with -mstructure-size-boundary=32 i found that fsck.fat does not work propertly and all gtk applications does not correctly handle input and xfce4-desktop shows icons with wrong coordinates After rebuilding dosfstools and libX11 problem was solved --- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- -mstructure-size-boundary (with size != 8) is really intended for use only with the old ABI and as such should probably be considered deprecated in any environment that does not use that as the default. Note that changing the structure layout rules is an ABI change and thus generates a data layout that is not interoperable with programs built to the default rules. The entire system will need to be rebuilt with that setting in order to avoid the sorts of issues you describe. Additionally, although over-alignment of structures is permitted by the C language, many software packages fail to take this portability constraint into account and assume that a structure will be no more aligned than its most aligned element (and no larger than the next multiple of that alignment that is larger than that required to hold all the elements). For example, struct s { char a; }; will have size 1 and alignment 1 with -mstructure-size-boundary=8, but size 4 and alignment 4 with -mstructure-size-boundary=32. This becomes significant when such structures are contained within other structures. Finally, you haven't provided a testcase. So in the absence of any real evidence that this is a compiler problem, I'm closing as invalid.