summaryrefslogtreecommitdiff
path: root/gcc/sdbout.c
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-12 20:04:50 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-12 20:04:50 +0000
commitb081e1bb8b94ec047d8c3de0f0d5364a3ec8ce16 (patch)
tree4f4d316cdf8f1b58caaa2fcd713ff9b7795ec4d8 /gcc/sdbout.c
parent745a600a13ef0c29258a644a87a81f8959823161 (diff)
downloadgcc-b081e1bb8b94ec047d8c3de0f0d5364a3ec8ce16.tar.gz
2014-11-12 Kai Tietz <ktietz@redhat.com>
* sdbout.c (sdbout_symbol): Eliminate register only if decl isn't a global variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217443 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sdbout.c')
-rw-r--r--gcc/sdbout.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 7b6f4573e05..4cea780c6eb 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -739,13 +739,16 @@ sdbout_symbol (tree decl, int local)
if (!DECL_RTL_SET_P (decl))
return;
- SET_DECL_RTL (decl,
- eliminate_regs (DECL_RTL (decl), VOIDmode, NULL_RTX));
+ value = DECL_RTL (decl);
+
+ if (!is_global_var (decl))
+ value = eliminate_regs (value, VOIDmode, NULL_RTX);
+
+ SET_DECL_RTL (decl, value);
#ifdef LEAF_REG_REMAP
if (crtl->uses_only_leaf_regs)
- leaf_renumber_regs_insn (DECL_RTL (decl));
+ leaf_renumber_regs_insn (value);
#endif
- value = DECL_RTL (decl);
/* Don't mention a variable at all
if it was completely optimized into nothingness.