aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-07-06 14:16:56 -0700
committerJeff Law <law@gcc.gnu.org>1998-07-06 15:16:56 -0600
commiteafdfea817312037878994ac18d70c8f4c917225 (patch)
tree6dd831c7c84945557c481a7ec346d223e2a54186 /gcc
parentad214bc2c876608b47dcc86a36b0b52c01153b74 (diff)
downloadgcc-eafdfea817312037878994ac18d70c8f4c917225.zip
gcc-eafdfea817312037878994ac18d70c8f4c917225.tar.gz
gcc-eafdfea817312037878994ac18d70c8f4c917225.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/regclass.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9704e67..6d26102 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/regclass.c b/gcc/regclass.c
index d76ace3..2bb6b42 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -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