------- Additional Comments From drew dot johnson at andrew dot com 2005-05-06 19:04 ------- Subject: RE: optimized code seg faults due to double load on sparcV9
I don't think so. Malloc does not guarantee anything but mod-4 alignment. You have to use memalign to get something better (at least on a Sun). I only did the +4 pointer stuff to ensure that the double would be misaligned mod8, as this is what was happening in my code. As long as I am on a mod4 boundary for my struct, the -munaligned-doubles flag should force the handling of doubles as though they are unaligned. The compiler with no optimization does this. But as soon as you turn on -O1, it ignores the unaligned-doubles directive. Drew -----Original Message----- From: pinskia at gcc dot gnu dot org [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 2:55 PM To: Johnson, Drew Subject: [Bug target/21389] optimized code seg faults due to double load on sparcV9 ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-06 18:54 ------- I think you violating alignment rules in C: x = tptr[1].f3; p = (char *)tptr; p += 4; tptr = (test1 *)p; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21389 ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter. ------------------------------------------------------------------------------------------------ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any unauthorized use of this email is prohibited. ------------------------------------------------------------------------------------------------ [mf2] -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21389