regclass.c (allocate_reg_info): Initialize the entire reg_data virtual array.

* regclass.c (allocate_reg_info): Initialize the entire reg_data
        virtual array.

From-SVN: r20961
This commit is contained in:
Richard Henderson 1998-07-06 14:16:56 -07:00 committed by Jeff Law
parent ad214bc2c8
commit eafdfea817
2 changed files with 9 additions and 2 deletions

View 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>

View 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