regclass.c (allocate_reg_info): Initialize the entire reg_data virtual array.
authorRichard Henderson <rth@cygnus.com>
Mon, 6 Jul 1998 21:16:56 +0000 (14:16 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 6 Jul 1998 21:16:56 +0000 (15:16 -0600)
        * regclass.c (allocate_reg_info): Initialize the entire reg_data
        virtual array.

From-SVN: r20961

gcc/ChangeLog
gcc/regclass.c

index 9704e67c64f43ae2a5f9b4f8d01b02e6cca68a6f..6d26102d9f112e320f4be5ec32291fe54e6a7c64 100644 (file)
@@ -1,3 +1,8 @@
+Mon Jul  6 22:14:31 1998  Richard Henderson  (rth@cygnus.com)
+
+       * regclass.c (allocate_reg_info): Initialize the entire reg_data
+       virtual array.
+
 Mon Jul  6 22:09:32 1998  Ian Lance Taylor  <ian@cygnus.com>
                          Jeff Law          <law@cygnus.com>
 
index d76ace3349910b62e8dd3c128e39c518e45ca2eb..2bb6b42095750726a92d024678b6fef828b9b50a 100644 (file)
@@ -1866,9 +1866,11 @@ allocate_reg_info (num_regs, new_p, renumber_p)
          size_t max_index = reg_data->max_index;
 
          reg_next = reg_data->next;
-         if (min_index <= num_regs)
+         if (min_index <= regno_allocated)
            {
-             size_t max = (max_index > num_regs) ? num_regs : max_index;
+             size_t max = max_index;
+             if (max > regno_allocated)
+               max = regno_allocated;
              if (!reg_data->used_p)    /* page just allocated with calloc */
                reg_data->used_p = 1;   /* no need to zero */
              else