error ("global register variable follows a function definition");
if (TREE_THIS_VOLATILE (decl))
warning ("volatile register variables don't work as you might wish");
- DECL_RTL (decl) = gen_rtx (REG, DECL_MODE (decl), reg_number);
+
+ /* If the user specified one of the eliminables registers here,
+ e.g., FRAME_POINTER_REGNUM, we don't want to get this variable
+ confused with that register and be eliminated. Although this
+ usage is somewhat suspect, we nevertheless use the following
+ kludge to avoid setting DECL_RTL to frame_pointer_rtx. */
+
+ DECL_RTL (decl)
+ = gen_rtx (REG, DECL_MODE (decl), FIRST_PSEUDO_REGISTER);
+ REGNO (DECL_RTL (decl)) = reg_number;
REG_USERVAR_P (DECL_RTL (decl)) = 1;
if (top_level)