This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

ppc and ia64 bootstrap compare fix, resend


On Mon, Mar 31, 2003 at 04:38:39PM -0500, David Edelsohn wrote:
> Richard> Did you not get my message this morning about the fix?
> 
> 	No, I did not receive any messages about real.[ch] since you
> mentioned that you could not bootstrap 3.2 with GCC 2.9 and I do not see
> anything on gcc-patches.

Huh.  Well, the problem was a read of an uninitialized field.
It fixes ia64 bootstrap compare; I assume it works for ppc too.


r~


        * real.c (real_identical): Reorg so as to not compare
        signalling for normals.

Index: real.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/real.c,v
retrieving revision 1.112
diff -u -p -u -r1.112 real.c
--- real.c	27 Mar 2003 22:41:58 -0000	1.112
+++ real.c	31 Mar 2003 18:49:43 -0000
@@ -1227,23 +1227,25 @@ real_identical (a, b)
     {
     case rvc_zero:
     case rvc_inf:
-      break;
+      return true;
 
     case rvc_normal:
       if (a->exp != b->exp)
  	return false;
-      /* FALLTHRU */
+      break;
+
     case rvc_nan:
       if (a->signalling != b->signalling)
 	return false;
-      for (i = 0; i < SIGSZ; ++i)
-	if (a->sig[i] != b->sig[i])
-	  return false;
       break;
 
     default:
       abort ();
     }
+
+  for (i = 0; i < SIGSZ; ++i)
+    if (a->sig[i] != b->sig[i])
+      return false;
 
   return true;
 }


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