This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40645] Bus error caused by ldd/std instructions in struct copy.
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2009 13:52:06 -0000
- Subject: [Bug c/40645] Bus error caused by ldd/std instructions in struct copy.
- References: <bug-40645-17885@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from ebotcazou at gcc dot gnu dot org 2009-07-04 13:52 -------
> If "-mno-faster-structs" is the default, then surely it shouldn't be
> generating ldd/std in this case (and assuming the 8-byte alignment for
> "union myblock").
No, -mno-faster-structs doesn't modify the ABI. The SPARC ABI requires union
myblock to have 64-bit alignment because it contains a structure that has
64-bit alignment because it contains a double. So the compiler can always use
ldd for union myblock.
-mfaster-structs does modify the ABI by promoting structures that have less
than 64-bit alignment as per the SPARC ABI, e.g. struct b_two. Without it, ldd
cannot be used for struct b_two; with it, lld can be used for struct b_two.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40645