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.
gcc/
* dbxout.c (dbxout_symbol): Don't call eliminate_regs on TREE_STATIC
decls.
------------------------------------------------------------------------
Index: gcc/dbxout.c
===================================================================
--- gcc/dbxout.c (revision 422348)
+++ gcc/dbxout.c (revision 422349)
@@ -2943,7 +2943,8 @@ dbxout_symbol (tree decl, int local ATTR
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);