aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/real.c b/gcc/real.c
index 7609d996152..f7af346db60 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -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;
@@ -2534,9 +2536,10 @@ encode_ieee_single (const struct real_format *fmt, long *buf,
const REAL_VALUE_TYPE *r)
{
unsigned long image, sig, exp;
+ unsigned long sign = r->sign;
bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
- image = r->sign << 31;
+ image = sign << 31;
sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 24)) & 0x7fffff;
switch (r->class)