This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
- 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: 18 Jan 2006 13:38:18 -0000
- Subject: [Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
- References: <bug-25791-12018@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from ebotcazou at gcc dot gnu dot org 2006-01-18 13:38 -------
> Notice that 'nscan' expects 'scancb' in %l0, but it is ZERO.
Better not trust GDB at -O2 on that one, it is easily fooled.
> It does NOT contain the value in R1 (aka: r1).
> (gdb) x/4bx &r1
> 0x2d6a0c <r1>: 0x00 0x31 0x17 0x80
That value is in %i0.
> Notice the assembly code in NSCAN just before the 'call nscan'
> at NSCAN+80. r1 never gets loaded into %l0. Therefore, it is
> NOT passed to 'nscan' properly.
The value is loaded into %o0 before 'call nscan' and end up in %i0 after the
save register window instruction.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25791