From: Jakub Jelinek Date: Sat, 4 Jul 2009 17:19:26 +0000 (+0200) Subject: re PR debug/40596 (Bad debug info for local variables on i386.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd5b2c2d0788f7e35b489171d945b35537899255;p=gcc.git re PR debug/40596 (Bad debug info for local variables on i386.) PR debug/40596 * dwarf2out.c (based_loc_descr): For crtl->stack_realign_tried don't check cfa.reg. Instead of cfa.indirect use fde && fde->drap_reg != INVALID_REGNUM test. From-SVN: r149235 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a4c3a7d25d..6d96786c2d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2009-07-04 Jakub Jelinek + + PR debug/40596 + * dwarf2out.c (based_loc_descr): For crtl->stack_realign_tried + don't check cfa.reg. Instead of cfa.indirect use + fde && fde->drap_reg != INVALID_REGNUM test. + 2009-07-04 Eric Botcazou * postreload.c (reload_combine): Replace CONST_REG with INDEX_REG. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 33240393c8f..01b534c1694 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10256,11 +10256,10 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset, is aligned without drap, use stack pointer + offset to access stack variables. */ if (crtl->stack_realign_tried - && cfa.reg == HARD_FRAME_POINTER_REGNUM && reg == frame_pointer_rtx) { int base_reg - = DWARF_FRAME_REGNUM (cfa.indirect + = DWARF_FRAME_REGNUM ((fde && fde->drap_reg != INVALID_REGNUM) ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM); return new_reg_loc_descr (base_reg, offset);