* real.c (do_divide): Initialize result with a 0.
authorHans-Peter Nilsson <hp@axis.com>
Wed, 29 Oct 2003 22:33:54 +0000 (22:33 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Wed, 29 Oct 2003 22:33:54 +0000 (22:33 +0000)
From-SVN: r73066

gcc/ChangeLog
gcc/real.c

index 063add204952c2228ec823521795b004ad269def..7613d75eb3333d22a6935d212e879890e0d9355c 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 7609d996152e4afdd240804c98f12639b5013c44..87246807f2f3428d4c0cf575a141359b7290dbf1 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;