------- Comment #3 from dentongosnell at yahoo dot com 2009-07-04 13:32 ------- (In reply to comment #2)
> > > One other thing, there is a flag "-mno-faster-structs" which this page > > suggests would prevent this sort of ldd/std use > > (http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html). Unfortunately > > this flag doesn't seem to make any difference to this case. > > -mno-faster-structs is the default. > 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"). The code it is generating is what I would expect if I passed "-mfaster-structs", based on the above-mentioned documentation page. In other words, gcc align_bug.c should give just ld/st pairs, and hence should work without a bus error. I think either the compiler or the documentation has a bug! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40645