OSDN Git Service

* tree.c (real_value_from_int_cst): Clear REAL_VALUE_TYPE object first.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Dec 1999 21:23:30 +0000 (21:23 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Dec 1999 21:23:30 +0000 (21:23 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31038 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index 2f2de25..1c25e77 100644 (file)
@@ -1,5 +1,7 @@
 Mon Dec 20 15:00:04 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * tree.c (real_value_from_int_cst): Clear REAL_VALUE_TYPE object first.
+
        * expr.c (store_constructor): New argument SIZE; pass to clear_storage.
        (store_constructor_field, expand_expr): Pass new arg.
 
index 6f6caf9..dd8a6d4 100644 (file)
@@ -1425,6 +1425,10 @@ real_value_from_int_cst (type, i)
   REAL_VALUE_TYPE d;
 
 #ifdef REAL_ARITHMETIC
+  /* Clear all bits of the real value type so that we can later do
+     bitwise comparisons to see if two values are the same.  */
+  bzero ((char *) &d, sizeof d);
+
   if (! TREE_UNSIGNED (TREE_TYPE (i)))
     REAL_VALUE_FROM_INT (d, TREE_INT_CST_LOW (i), TREE_INT_CST_HIGH (i),
                         TYPE_MODE (type));