* real.c (do_divide): Initialize result with a 0.
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Oct 2003 22:33:54 +0000 (22:33 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Oct 2003 22:33:54 +0000 (22:33 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73066 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/real.c

index 063add2..7613d75 100644 (file)
@@ -1,5 +1,7 @@
 2003-10-29  Hans-Peter Nilsson  <hp@axis.com>
 
+       * real.c (do_divide): Initialize result with a 0.
+
        * configure.in <enable-checking for valgrind>: Look for
        <valgrind/memcheck.h> first.  AC_DEFINE HAVE_VALGRIND_MEMCHECK_H
        if it exists.
index 7609d99..8724680 100644 (file)
@@ -858,6 +858,8 @@ do_divide (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a,
   else
     rr = r;
 
+  /* Make sure all fields in the result are initialized.  */
+  get_zero (rr, 0);
   rr->class = rvc_normal;
   rr->sign = sign;