]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR debug/48466 (Wrong variable locations at -O0 on i686)
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Apr 2011 21:27:59 +0000 (23:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Apr 2011 21:27:59 +0000 (23:27 +0200)
Backported from mainline
2011-04-06  Jakub Jelinek  <jakub@redhat.com>

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

gcc/ChangeLog
gcc/dwarf2out.c

index 23e70e3201bf62979d5496a43c7f5cec158172cf..e41103c41a10864d691b79fa5c8a28db79ba337f 100644 (file)
@@ -1,6 +1,13 @@
 2011-04-07  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2011-04-06  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <jakub@redhat.com>
 
        PR rtl-optimization/48141
index 6610cb2e401e2627ad93b8ef75d43c446e052a13..db31f75747ecd4326da0d9177fa598720739eeb6 100644 (file)
@@ -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);
            }