diff options
author | Janis Johnson <janis187@us.ibm.com> | 2007-09-11 01:11:16 +0000 |
---|---|---|
committer | Janis Johnson <janis@gcc.gnu.org> | 2007-09-11 01:11:16 +0000 |
commit | f3d110ef046e4dd98a82ba8a6365427181c16b1e (patch) | |
tree | 200c6b2a83392535448b0fad1e529f6969081b6a /gcc/lambda-code.c | |
parent | 9fc777ad2561e542ef0eec9d94ee8cb5edc68554 (diff) | |
download | gcc-f3d110ef046e4dd98a82ba8a6365427181c16b1e.zip gcc-f3d110ef046e4dd98a82ba8a6365427181c16b1e.tar.gz gcc-f3d110ef046e4dd98a82ba8a6365427181c16b1e.tar.bz2 |
re PR c/30013 (Multiple flaws in decimal floating-point arithmetic conversions fixed)
gcc/
PR c/30013
* config/dfp-bit.c: Don't skip TFmode conversions; move strto*
declarations to top.
(DFP_TO_BFP): Use for either XFmode or TFmode.
(BFP_TO_DFP): Use for either XFmode or TFmode; always use cast
of BFP_VIA_TYPE.
* config/dfp-bit.h: Include float.h.
(LONG_DOUBLE_HAS_XF_MODE, LONG_DOUBLE_HAS_TF_MODE): Define if long
double is one of these modes, rather than using LIBGCC_HAS_*F_MODE
which doesn't mean the same thing.
(BFP_KIND): Use 4 to mean TFmode.
(BFP_FMT): Specify the number of decimal digits based on the
number of mantissa digits.
(BFP_VIA_TYPE): Binary float type to use as cast for sprintf.
(BFP_TO_DFP, DFP_TO_BFP): Define names for TFmode variants.
(STR_TO_BFP): Use strtold for XFmode or TFmode.
(TFtype): Define if TFmode is supported.
* doc/libgcc.texi (Decimal float library routines): Document
TF conversion functions.
gcc/testsuite/
* gcc.dg/dfp/convert-bfp.c: Replace SKIP_LONG_DOUBLE with runtime
checks for size of long double.
* gcc.dg/dfp/convert.h: New file.
* gcc.dg/dfp/convert-bfp-2.c: New test.
* gcc.dg/dfp/convert-bfp-3.c: Ditto.
* gcc.dg/dfp/convert-bfp-4.c: Ditto.
* gcc.dg/dfp/convert-bfp-5.c: Ditto.
* gcc.dg/dfp/convert-bfp-6.c: Ditto.
* gcc.dg/dfp/convert-bfp-7.c: Ditto.
* gcc.dg/dfp/convert-bfp-8.c: Ditto.
* gcc.dg/dfp/convert-bfp-9.c: Ditto.
* gcc.dg/dfp/convert-bfp-10.c: Ditto.
* gcc.dg/dfp/convert-bfp-11.c: Ditto.
From-SVN: r128361
Diffstat (limited to 'gcc/lambda-code.c')
0 files changed, 0 insertions, 0 deletions