From c77d28aca7f60d85f1355d311ade879a2b470e10 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Mon, 24 Apr 2006 21:34:41 +0000 Subject: [PATCH] * floatformat.c (floatformat_to_double): Fix (biased) exponent=0 case. --- libiberty/ChangeLog | 4 ++++ libiberty/floatformat.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index fb328da633c..76baa3c3ac2 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2006-04-24 Julian Brown + + * floatformat.c (floatformat_to_double): Fix (biased) exponent=0 case. + 2006-03-29 Jim Blandy * pex-common.c (pex_input_file, pex_input_pipe): New functions. diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c index bd31efac7c1..0bbb8ed9889 100644 --- a/libiberty/floatformat.c +++ b/libiberty/floatformat.c @@ -394,7 +394,7 @@ floatformat_to_double (const struct floatformat *fmt, /* Handle denormalized numbers. FIXME: What should we do for non-IEEE formats? */ - if (exponent == 0 && mant != 0) + if (special_exponent && exponent == 0 && mant != 0) dto += ldexp ((double)mant, (- fmt->exp_bias - mant_bits -- 2.30.2