From cee690f1844f3da539acd66917847ba57905206e Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Fri, 2 Mar 2007 05:28:06 +0000 Subject: [PATCH] re PR middle-end/30992 (Scaling error in decimal floating-point arithmetic blows conversions to integers) 2007-03-02 Ben Elliston PR 30992 * config/dfp-bit.c (DFP_TO_INT): Initialise qval with "1.". From-SVN: r122469 --- gcc/ChangeLog | 5 +++++ gcc/config/dfp-bit.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc055f55d62..663fabb17c6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-03-02 Ben Elliston + + PR 30992 + * config/dfp-bit.c (DFP_TO_INT): Initialise qval with "1.". + 2007-03-02 Joseph Myers * target.h (init_dwarf_reg_sizes_extra): New target hook. diff --git a/gcc/config/dfp-bit.c b/gcc/config/dfp-bit.c index 927804c1def..2fa89996967 100644 --- a/gcc/config/dfp-bit.c +++ b/gcc/config/dfp-bit.c @@ -450,7 +450,7 @@ DFP_TO_INT (DFP_C_TYPE x) /* Rescale if the exponent is less than zero. */ decNumberToIntegralValue (&n2, &n1, &context); /* Get a value to use for the quantize call. */ - decNumberFromString (&qval, (char *) "1.0", &context); + decNumberFromString (&qval, (char *) "1.", &context); /* Force the exponent to zero. */ decNumberQuantize (&n1, &n2, &qval, &context); /* Get a string, which at this point will not include an exponent. */