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
This commit is contained in:
parent
37ea0b7e74
commit
cee690f184
|
@ -1,3 +1,8 @@
|
||||||
|
2007-03-02 Ben Elliston <bje@au.ibm.com>
|
||||||
|
|
||||||
|
PR 30992
|
||||||
|
* config/dfp-bit.c (DFP_TO_INT): Initialise qval with "1.".
|
||||||
|
|
||||||
2007-03-02 Joseph Myers <joseph@codesourcery.com>
|
2007-03-02 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* target.h (init_dwarf_reg_sizes_extra): New target hook.
|
* target.h (init_dwarf_reg_sizes_extra): New target hook.
|
||||||
|
|
|
@ -450,7 +450,7 @@ DFP_TO_INT (DFP_C_TYPE x)
|
||||||
/* Rescale if the exponent is less than zero. */
|
/* Rescale if the exponent is less than zero. */
|
||||||
decNumberToIntegralValue (&n2, &n1, &context);
|
decNumberToIntegralValue (&n2, &n1, &context);
|
||||||
/* Get a value to use for the quantize call. */
|
/* 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. */
|
/* Force the exponent to zero. */
|
||||||
decNumberQuantize (&n1, &n2, &qval, &context);
|
decNumberQuantize (&n1, &n2, &qval, &context);
|
||||||
/* Get a string, which at this point will not include an exponent. */
|
/* Get a string, which at this point will not include an exponent. */
|
||||||
|
|
Loading…
Reference in New Issue