* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / fe-convert-1.c
blobb6528029b40a5ad19481dabbf7f79322c75fb6d0
1 /* { dg-skip-if "test is for emulation" { hard_dfp } { "*" } { "" } } */
3 /* Check that appropriate exceptions are raised for conversions involving
4 decimal float values. */
6 #include "fe-check.h"
8 volatile _Decimal32 d32;
9 volatile _Decimal64 d64;
10 volatile _Decimal128 d128;
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. */
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)
26 int
27 main ()
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 ();
39 FINISH