This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ppc and ia64 bootstrap compare fix, resend
- From: Richard Henderson <rth at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Mar 2003 13:42:02 -0800
- Subject: ppc and ia64 bootstrap compare fix, resend
- References: <20030331213223.GB25747@redhat.com> <200303312138.QAA32138@makai.watson.ibm.com>
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;
}