OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [fe-convert-1.c] - Blame information for rev 298

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-skip-if "test is for emulation" { hard_dfp } { "*" } { "" } } */
2
 
3
/* Check that appropriate exceptions are raised for conversions involving
4
   decimal float values.  */
5
 
6
#include "fe-check.h"
7
 
8
volatile _Decimal32 d32;
9
volatile _Decimal64 d64;
10
volatile _Decimal128 d128;
11
 
12
/* Conversions between decimal float types should raise an invalid
13
   exception if the value doesn't fit, either because the value
14
   is too large or the result can't hold the full precision.  */
15
 
16
CONVERT (100, d64, d32, 9.999999e96DD, 0)
17
CONVERT (101, d64, d32, 10.000000e96DD, FE_INEXACT|FE_OVERFLOW)
18
CONVERT (102, d64, d32, 1.1111111DD, FE_INEXACT)
19
CONVERT (110, d128, d32, 9.999999e96DL, 0)
20
CONVERT (111, d128, d32, 10.000000e96DL, FE_INEXACT|FE_OVERFLOW)
21
CONVERT (112, d128, d32, 1.1111111DL, FE_INEXACT)
22
CONVERT (120, d128, d64, 9.999999999999999E384DL, 0)
23
CONVERT (121, d128, d64, 10.00000000000000E384DL, FE_INEXACT|FE_OVERFLOW)
24
CONVERT (122, d128, d64, 1.1111111111111111DL, FE_INEXACT)
25
 
26
int
27
main ()
28
{
29
  convert_100 ();
30
  convert_101 ();
31
  convert_102 ();
32
  convert_110 ();
33
  convert_111 ();
34
  convert_112 ();
35
  convert_120 ();
36
  convert_121 ();
37
  convert_122 ();
38
 
39
  FINISH
40
}

powered by: WebSVN 2.1.0

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