http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47624
Summary: FAIL: gcc.dg/guality/pr43077-1.c -O1 line 42 c == 3
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: [email protected]
ReportedBy: [email protected]
Target: powerpc*-*-*
Breakpoint 1, fn3 ()
at /daten/gcc/gcc-20110206/gcc/testsuite/gcc.dg/guality/pr43077-1.c:44
44 }
(gdb) i addr c
Symbol "c" is a complex DWARF expression:
1: DW_OP_breg4 12 [$r4]
.
(gdb) disass
Dump of assembler code for function fn3:
0x100004e0 <+0>: stwu r1,-32(r1)
0x100004e4 <+4>: mflr r0
0x100004e8 <+8>: stw r0,36(r1)
0x100004ec <+12>: li r0,0
0x100004f0 <+16>: stw r0,8(r1)
0x100004f4 <+20>: mr r4,r1
0x100004f8 <+24>: stwu r0,12(r4)
0x100004fc <+28>: addi r3,r1,8
0x10000500 <+32>: bl 0x100004c4 <foo>
=> 0x10000504 <+36>: lwz r0,36(r1)
0x10000508 <+40>: mtlr r0
0x1000050c <+44>: addi r1,r1,32
0x10000510 <+48>: blr
End of assembler dump.
c is not at $r4+12 but at $r4+0 (or $r1+12) because $r4 has been incremented
when the value was stored.