http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48220
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23739|0 |1 is obsolete| | --- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-11 16:02:28 UTC --- Created attachment 24740 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24740 Tentative patch for SPARC This appears to do the trick for the SPARC. In particular: (gdb) run Starting program: /nile.build/botcazou/gcc-head/sparc-sun-solaris2.8/pr48220 Breakpoint 1, fn2 (a=1, b=2, c=1) at pr48220.c:13 13 { (gdb) disass Dump of assembler code for function fn2: => 0x000106cc <+0>: save %sp, -96, %sp 0x000106d0 <+4>: clr %i0 0x000106d4 <+8>: mov 5, %o0 0x000106d8 <+12>: mov 6, %o1 0x000106dc <+16>: call 0x106c4 <fn1> 0x000106e0 <+20>: mov 7, %o2 0x000106e4 <+24>: rett %i7 + 8 0x000106e8 <+28>: nop End of assembler dump. (gdb) p a $1 = 1 (gdb) p &a Address requested for identifier "a" which is in register $o0 (gdb) nexti 17 } (gdb) p a $2 = 1 (gdb) p &a Address requested for identifier "a" which is in register $i0 (gdb) nexti 15 fn1 (5, 6, 7); (gdb) p a $3 = <optimized out> and the location is DW_OP_GNU_entry_value pointing to $o0 from there on. Jakub, what do you think?