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 20:17, Andreas Jaeger wrote:
> Bootstrapping gcc CVS current (checked out around 18:00 UTC 6th
> January 2001) with gcc 2.95.2 on i686-linux-gnu with glibc 2.2 gives a
> comparsion failure on haifa-sched.o:
> [...]
> Bootstrap comparison failure!
> haifa-sched.o differs
> make[1]: *** [compare] Error 1
>
> I've run objdump -xD on both haifa-sched.o files and diffed the
> output.  The difference is just register renaming.  How can this
> happen?  Any ideas?
>
> My configure command is:
> /cvs/gcc/configure --prefix=/opt/gcc-2.97.test --enable-shared \
>          --enable-threads=posix \
>          --with-gnu-as --with-gnu-ld --disable-nls --with-system-zlib \
>          --enable-languages=c,objc,c++,f77
>
> And I run "make bootstrap" - until I got the above failure.  I didn't
> pass any CFLAGS.

I have similar problems on powerpc-linux-gnu and for me the differences start 
in the loop dump. After realizing that I checked out the recent loop patches 
from Michael Hayes and I think I found a difference against the original 
code, realloced memory is not cleared anymore. VARRAY_GROW handled that 
automatically before. The appended patch fixes that, but I don't know yet if 
it really fixes the comparison failure, bootstrap is still running. You might 
wanna try the patch nevertheless though. I'll check it in under the "obvious 
fix rule" if it fixes my comparison failure.

Franz.

	* loop.c (load_mems_and_recount_loop_regs_set): Clear memory added by
	realloc.

Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.314
diff -u -p -r1.314 loop.c
--- loop.c	2001/01/06 03:24:57	1.314
+++ loop.c	2001/01/06 19:33:46
@@ -8724,9 +8724,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]