reload1.c (eliminate_regs): Don't do anything, if we're not generating code.
authorNathan Sidwell <nathan@acm.org>
Mon, 7 Dec 1998 22:10:45 +0000 (15:10 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 7 Dec 1998 22:10:45 +0000 (15:10 -0700)

        * reload1.c (eliminate_regs): Don't do anything, if we're not
        generating code.

From-SVN: r24168

gcc/reload1.c

index 1b94254b9a4d84aadfa8142d0d84e8248e9a7b92..9595ffd429974009c8d8be51320b81f2d837016a 100644 (file)
@@ -2651,11 +2651,8 @@ eliminate_regs (x, mem_mode, insn)
   char *fmt;
   int copied = 0;
 
-  /* We can reach here without reload being run if we have an variable
-     definition in a file with no functions (for exmaple).  Ensure we
-     have a valid elimination table in such cases.  */
-  if (reg_eliminate == NULL)
-    init_elim_table ();
+  if (! current_function_decl)
+    return x;
 
   switch (code)
     {