(save_for_inline_copying): Allocate reg_map with size
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 15 Feb 1996 21:48:26 +0000 (13:48 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 15 Feb 1996 21:48:26 +0000 (13:48 -0800)
based on regno_pointer_flag_length instead of max_reg+1.

From-SVN: r11279

gcc/integrate.c

index 4ecbfb27ea4c4bc0f4673677df3feea933f7fbd9..0d871bd4a1b5735fbb3a3a2e0242cfd42aa8ff39 100644 (file)
@@ -474,7 +474,7 @@ save_for_inline_copying (fndecl)
      Make these new rtx's now, and install them in regno_reg_rtx, so they
      will be the official pseudo-reg rtx's for the rest of compilation.  */
 
-  reg_map = (rtx *) savealloc ((max_reg + 1) * sizeof (rtx));
+  reg_map = (rtx *) savealloc (regno_pointer_flag_length * sizeof (rtx));
 
   len = sizeof (struct rtx_def) + (GET_RTX_LENGTH (REG) - 1) * sizeof (rtunion);
   for (i = max_reg - 1; i > LAST_VIRTUAL_REGISTER; i--)