This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bootstrap comparison failure on i686-linux


On Saturday 06 January 2001 23:25, Richard Henderson wrote:
> On Sat, Jan 06, 2001 at 10:23:54PM +0100, Toon Moene wrote:
> > Ideas, anyone ?
>
> Nope, as my alphaev6 bootstraps are successful, but
> my i686 bootstraps aren't.  And in different places
> than either Franz or Andreas reported.  Sigh.

I've found another place to fix and now it bootstraps again for me.

OK to commit?

Franz.

	* loop.c (scan_loop): Allocate cleared memory for regs->array, delete
	explicit initialization.
	(load_mems_and_recount_loop_regs_set): Clear memory added by realloc.

Index: gcc/loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.314
diff -u -p -r1.314 loop.c
--- gcc/loop.c	2001/01/06 03:24:57	1.314
+++ gcc/loop.c	2001/01/06 23:06:28
@@ -627,15 +627,8 @@ scan_loop (loop, flags)
      the arrays, if necessary, in load_mems_recount_loop_regs_set.  */
   regs->size = regs->num + loop_info->mems_idx + 16;
   regs->array = (struct loop_reg *) 
-    xmalloc (regs->size * sizeof (*regs->array));
+    xcalloc (regs->size, sizeof (*regs->array));
 
-  for (i = 0; i < regs->num; i++)
-    {
-      regs->array[i].set_in_loop = 0;
-      regs->array[i].may_not_optimize = 0;
-      regs->array[i].single_usage = NULL_RTX;
-    }
-
   count_loop_regs_set (loop, &insn_count);
 
   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
@@ -8724,9 +8717,11 @@ load_mems_and_recount_loop_regs_set (loo
 	  /* Grow the array.  */
 	  regs->array = (struct loop_reg *)
 	    xrealloc (regs->array, regs->size * sizeof (*regs->array));
+	  for (i = old_nregs; i < regs->num; i++)
+	    memset (&regs->array[i], 0, sizeof (*regs->array));
 	}
 
-      for (i = 0; i < regs->num; i++)
+      for (i = 0; i < old_nregs; i++)
 	{
 	  regs->array[i].set_in_loop = 0;
 	  regs->array[i].may_not_optimize = 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]