aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/dfp-bit.c
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2007-03-02 05:28:06 +0000
committerBen Elliston <bje@gcc.gnu.org>2007-03-02 16:28:06 +1100
commitcee690f1844f3da539acd66917847ba57905206e (patch)
tree8d6344503572980943d557f46ef673cea6927ab7 /gcc/config/dfp-bit.c
parent37ea0b7e741cfc68669e8a6d460bfc5f8bfb31ba (diff)
downloadgcc-cee690f1844f3da539acd66917847ba57905206e.zip
gcc-cee690f1844f3da539acd66917847ba57905206e.tar.gz
gcc-cee690f1844f3da539acd66917847ba57905206e.tar.bz2
re PR middle-end/30992 (Scaling error in decimal floating-point arithmetic blows conversions to integers)
2007-03-02 Ben Elliston <bje@au.ibm.com> PR 30992 * config/dfp-bit.c (DFP_TO_INT): Initialise qval with "1.". From-SVN: r122469
Diffstat (limited to 'gcc/config/dfp-bit.c')
-rw-r--r--gcc/config/dfp-bit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/dfp-bit.c b/gcc/config/dfp-bit.c
index 927804c..2fa8999 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. */