fe-convert-1.c: Expect FE_OVERFLOW when converting from 10.000000e96DD to _Decimal32...

2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.dg/dfp/fe-convert-1.c: Expect FE_OVERFLOW when converting
	from 10.000000e96DD to _Decimal32, from 10.000000e96DL to
	_Decimal32 and from 10.00000000000000E384DL to _Decimal64.

	*  gcc.dg/dfp/fe-convert-2.c: Expect FE_INEXACT when converting
	from 1.0e96 and -1.0e96 to _Decimal32. Enable testing for
	converting from 1.0e-96 and 0.00048828125 to _Decimal32 when
	BID is used.

From-SVN: r125718
This commit is contained in:
H.J. Lu 2007-06-14 17:24:22 +00:00 committed by H.J. Lu
parent 3fcfad7607
commit 9929612817
3 changed files with 24 additions and 9 deletions

View File

@ -1,3 +1,14 @@
2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/dfp/fe-convert-1.c: Expect FE_OVERFLOW when converting
from 10.000000e96DD to _Decimal32, from 10.000000e96DL to
_Decimal32 and from 10.00000000000000E384DL to _Decimal64.
* gcc.dg/dfp/fe-convert-2.c: Expect FE_INEXACT when converting
from 1.0e96 and -1.0e96 to _Decimal32. Enable testing for
converting from 1.0e-96 and 0.00048828125 to _Decimal32 when
BID is used.
2007-06-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32302

View File

@ -14,13 +14,13 @@ volatile _Decimal128 d128;
is too large or the result can't hold the full precision. */
CONVERT (100, d64, d32, 9.999999e96DD, 0)
CONVERT (101, d64, d32, 10.000000e96DD, FE_INEXACT)
CONVERT (101, d64, d32, 10.000000e96DD, FE_INEXACT|FE_OVERFLOW)
CONVERT (102, d64, d32, 1.1111111DD, FE_INEXACT)
CONVERT (110, d128, d32, 9.999999e96DL, 0)
CONVERT (111, d128, d32, 10.000000e96DL, FE_INEXACT)
CONVERT (111, d128, d32, 10.000000e96DL, FE_INEXACT|FE_OVERFLOW)
CONVERT (112, d128, d32, 1.1111111DL, FE_INEXACT)
CONVERT (120, d128, d64, 9.999999999999999E384DL, 0)
CONVERT (121, d128, d64, 10.00000000000000E384DL, FE_INEXACT)
CONVERT (121, d128, d64, 10.00000000000000E384DL, FE_INEXACT|FE_OVERFLOW)
CONVERT (122, d128, d64, 1.1111111111111111DL, FE_INEXACT)
int

View File

@ -9,15 +9,15 @@
volatile _Decimal32 d32;
volatile double d;
CONVERT (100, d, d32, 1.0e96, 0)
CONVERT (100, d, d32, 1.0e96, FE_INEXACT)
CONVERT (101, d, d32, 1.0e97, FE_OVERFLOW|FE_INEXACT)
CONVERT (102, d, d32, -1.0e96, 0)
CONVERT (102, d, d32, -1.0e96, FE_INEXACT)
CONVERT (103, d, d32, -1.0e97, FE_OVERFLOW|FE_INEXACT)
#if 0
/* These should result in fp exceptions but don't. */
CONVERT (xxx, d, d32, 1.0e-96, FE_UNDERFLOW|FE_INEXACT)
CONVERT (xxx, d, d32, 0.00048828125, FE_INEXACT) /* exact power of 2 */
#ifdef __DECIMAL_BID_FORMAT__
/* These only result in fp exceptions with BID. DPD doesn't work. */
CONVERT (104, d, d32, 1.0e-96, FE_UNDERFLOW|FE_INEXACT)
CONVERT (105, d, d32, 0.00048828125, FE_INEXACT) /* exact power of 2 */
#endif
int
@ -27,6 +27,10 @@ main ()
convert_101 ();
convert_102 ();
convert_103 ();
#ifdef __DECIMAL_BID_FORMAT__
convert_104 ();
convert_105 ();
#endif
if (failcnt != 0)
abort ();