From: Jakub Jelinek Date: Thu, 7 Apr 2011 21:27:59 +0000 (+0200) Subject: backport: re PR debug/48466 (Wrong variable locations at -O0 on i686) X-Git-Tag: releases/gcc-4.4.6~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c9349b0e72e099231870fa8c7065eca62748624;p=thirdparty%2Fgcc.git backport: re PR debug/48466 (Wrong variable locations at -O0 on i686) Backported from mainline 2011-04-06 Jakub Jelinek PR debug/48466 * dwarf2out.c (based_loc_descr): If drap_reg is INVALID_REGNUM, use as base_reg whatever register reg has been eliminated to, instead of hardcoding STACK_POINTER_REGNUM. From-SVN: r172133 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 23e70e3201bf..e41103c41a10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,13 @@ 2011-04-07 Jakub Jelinek Backported from mainline + 2011-04-06 Jakub Jelinek + + PR debug/48466 + * dwarf2out.c (based_loc_descr): If drap_reg is INVALID_REGNUM, use + as base_reg whatever register reg has been eliminated to, instead + of hardcoding STACK_POINTER_REGNUM. + 2011-03-17 Jakub Jelinek PR rtl-optimization/48141 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6610cb2e401e..db31f75747ec 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9895,7 +9895,7 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset, int base_reg = DWARF_FRAME_REGNUM (cfa.indirect ? HARD_FRAME_POINTER_REGNUM - : STACK_POINTER_REGNUM); + : REGNO (elim)); return new_reg_loc_descr (base_reg, offset); }