This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30826] alignment error when optimizing with inlining
- From: "michael dot haubenwallner at salomon dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2007 18:06:28 -0000
- Subject: [Bug tree-optimization/30826] alignment error when optimizing with inlining
- References: <bug-30826-9385@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from michael dot haubenwallner at salomon dot at 2007-02-16 18:06 -------
Have already debugged inside mallinfo(), where gdb says:
Program received signal SIGBUS, Bus error
si_code: 1 - BUS_ADRALN - Invalid address alignment.
0x200000007edb4130:0 in mallinfo+0x180 () from /usr/lib/hpux32/libc.so.1
The disassembly snippet of mallopt() is:
(gdb) disassemble $pc $pc+0x10
Dump of assembler code from 0x200000007edb4130:0 to 0x200000007edb4140:0:
0x200000007edb4130:0 <mallinfo+0x180>: st8 [r79]=r9
0x200000007edb4130:1 <mallinfo+0x181>: st8 [r38]=r8,8
0x200000007edb4130:2 <mallinfo+0x182>: adds r14=-8,r11;;
End of assembler dump.
(gdb) p /x $r79
$2 = 0x200000007fffe914
(gdb)
The value of r79 comes from that r8 set on line#18, which is incorrectly
aligned to 4 when calculated from '20, r12'.
Seems that it needs to be aligned to 8 for 'st8'...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30826