It turns out that we're calling eliminate_regs for global variables
which can't possibly have eliminable regs in their decl. At that point,
reg_eliminate can be NULL. This patch avoids unnecessary work, and
allows us to add an assert to eliminate_regs later.
Bootstrapped and tested on x86_64-linux, together with the other
patches. Ok?
Bernd
* dbxout.c (dbxout_symbol): Don't call eliminate_regs on TREE_STATIC
decls.
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index d856bdd..ffef1f5 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2887,7 +2887,8 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
if (!decl_rtl)
DBXOUT_DECR_NESTING_AND_RETURN (0);
- decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
+ if (!TREE_STATIC (decl))
+ decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
#ifdef LEAF_REG_REMAP
if (crtl->uses_only_leaf_regs)
leaf_renumber_regs_insn (decl_rtl);