OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [fe-convert-2.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Check that appropriate exceptions are raised for BFP to DFP conversions.
2
   The test only uses double and _Decimal32; tests for conversions to
3
   _Decimal64 would need 128-bit long double.  */
4
 
5
#include "fe-check.h"
6
 
7
volatile _Decimal32 d32;
8
volatile double d;
9
 
10
CONVERT (100, d, d32, 1.0e96, FE_INEXACT)
11
CONVERT (101, d, d32, 1.0e97, FE_OVERFLOW|FE_INEXACT)
12
CONVERT (102, d, d32, -1.0e96, FE_INEXACT)
13
CONVERT (103, d, d32, -1.0e97, FE_OVERFLOW|FE_INEXACT)
14
 
15
/* FIXME: These only result in fp exceptions when libbid is used.
16
   libdecnumber doesn't work correctly.  */
17
CONVERT (104, d, d32, 1.0e-96, FE_UNDERFLOW|FE_INEXACT)
18
CONVERT (105, d, d32, 0.00048828125, FE_INEXACT)  /* exact power of 2 */
19
 
20
int
21
main ()
22
{
23
  convert_100 ();
24
  convert_101 ();
25
  convert_102 ();
26
  convert_103 ();
27
  convert_104 ();
28
  convert_105 ();
29
 
30
  FINISH
31
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.