[Bug c/40645] Bus error caused by ldd/std instructions in struct copy.

2009-07-04 Thread ebotcazou 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.

[Bug c/40645] Bus error caused by ldd/std instructions in struct copy.

2009-07-04 Thread dentongosnell at yahoo dot com
--- 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).

[Bug c/40645] Bus error caused by ldd/std instructions in struct copy.

2009-07-03 Thread ebotcazou at gcc dot gnu dot org
--- Comment #2 from ebotcazou at gcc dot gnu dot org 2009-07-04 06:43 --- > I think the compiler is assuming "union myblock" has the same > alignment as "struct b_one", which is more strictly aligned than > "struct b_two" because of its double member. That's right and it's prescribed b

[Bug c/40645] Bus error caused by ldd/std instructions in struct copy.

2009-07-03 Thread pinskia at gmail dot com
--- Comment #1 from pinskia at gmail dot com 2009-07-04 01:38 --- Subject: Re: New: Bus error caused by ldd/std instructions in struct copy. This code is undefined because of alignment requirments differences for the structs and the union. Sent from my iPhone On Jul 3, 2009, at 6: