1 |
149 |
jeremybenn |
/* Test for hexadecimal float rounding: bug 21720. */
|
2 |
|
|
/* { dg-do link } */
|
3 |
|
|
/* { dg-options "-O -std=gnu99" } */
|
4 |
|
|
|
5 |
|
|
#include <float.h>
|
6 |
|
|
|
7 |
|
|
extern void link_failure (void);
|
8 |
|
|
|
9 |
|
|
int
|
10 |
|
|
main (void)
|
11 |
|
|
{
|
12 |
|
|
#if FLT_RADIX == 2 && FLT_MANT_DIG == 24
|
13 |
|
|
if (0x1.0000011p0f == 1)
|
14 |
|
|
link_failure ();
|
15 |
|
|
if (0x1.00000101p0f == 1)
|
16 |
|
|
link_failure ();
|
17 |
|
|
if (0x1.000001001p0f == 1)
|
18 |
|
|
link_failure ();
|
19 |
|
|
if (0x1.0000010001p0f == 1)
|
20 |
|
|
link_failure ();
|
21 |
|
|
if (0x1.00000100001p0f == 1)
|
22 |
|
|
link_failure ();
|
23 |
|
|
if (0x1.000001000001p0f == 1)
|
24 |
|
|
link_failure ();
|
25 |
|
|
if (0x1.0000010000001p0f == 1)
|
26 |
|
|
link_failure ();
|
27 |
|
|
if (0x1.00000100000001p0f == 1)
|
28 |
|
|
link_failure ();
|
29 |
|
|
if (0x1.000001000000001p0f == 1)
|
30 |
|
|
link_failure ();
|
31 |
|
|
if (0x1.0000010000000001p0f == 1)
|
32 |
|
|
link_failure ();
|
33 |
|
|
if (0x1.00000100000000001p0f == 1)
|
34 |
|
|
link_failure ();
|
35 |
|
|
if (0x1.000001000000000001p0f == 1)
|
36 |
|
|
link_failure ();
|
37 |
|
|
if (0x1.0000010000000000001p0f == 1)
|
38 |
|
|
link_failure ();
|
39 |
|
|
if (0x1.00000100000000000001p0f == 1)
|
40 |
|
|
link_failure ();
|
41 |
|
|
if (0x1.000001000000000000001p0f == 1)
|
42 |
|
|
link_failure ();
|
43 |
|
|
if (0x1.0000010000000000000001p0f == 1)
|
44 |
|
|
link_failure ();
|
45 |
|
|
if (0x1.00000100000000000000001p0f == 1)
|
46 |
|
|
link_failure ();
|
47 |
|
|
if (0x1.000001000000000000000001p0f == 1)
|
48 |
|
|
link_failure ();
|
49 |
|
|
if (0x1.0000010000000000000000001p0f == 1)
|
50 |
|
|
link_failure ();
|
51 |
|
|
if (0x1.00000100000000000000000001p0f == 1)
|
52 |
|
|
link_failure ();
|
53 |
|
|
if (0x1.000001000000000000000000001p0f == 1)
|
54 |
|
|
link_failure ();
|
55 |
|
|
if (0x1.0000010000000000000000000001p0f == 1)
|
56 |
|
|
link_failure ();
|
57 |
|
|
if (0x1.00000100000000000000000000001p0f == 1)
|
58 |
|
|
link_failure ();
|
59 |
|
|
if (0x1.000001000000000000000000000001p0f == 1)
|
60 |
|
|
link_failure ();
|
61 |
|
|
if (0x1.0000010000000000000000000000001p0f == 1)
|
62 |
|
|
link_failure ();
|
63 |
|
|
if (0x1.00000100000000000000000000000001p0f == 1)
|
64 |
|
|
link_failure ();
|
65 |
|
|
if (0x1.000001000000000000000000000000001p0f == 1)
|
66 |
|
|
link_failure ();
|
67 |
|
|
if (0x1.0000010000000000000000000000000001p0f == 1)
|
68 |
|
|
link_failure ();
|
69 |
|
|
if (0x1.00000100000000000000000000000000001p0f == 1)
|
70 |
|
|
link_failure ();
|
71 |
|
|
if (0x1.000001000000000000000000000000000001p0f == 1)
|
72 |
|
|
link_failure ();
|
73 |
|
|
if (0x1.0000010000000000000000000000000000001p0f == 1)
|
74 |
|
|
link_failure ();
|
75 |
|
|
if (0x1.00000100000000000000000000000000000001p0f == 1)
|
76 |
|
|
link_failure ();
|
77 |
|
|
if (0x1.000001000000000000000000000000000000001p0f == 1)
|
78 |
|
|
link_failure ();
|
79 |
|
|
if (0x1.0000010000000000000000000000000000000001p0f == 1)
|
80 |
|
|
link_failure ();
|
81 |
|
|
if (0x1.00000100000000000000000000000000000000001p0f == 1)
|
82 |
|
|
link_failure ();
|
83 |
|
|
if (0x1.000001000000000000000000000000000000000001p0f == 1)
|
84 |
|
|
link_failure ();
|
85 |
|
|
if (0x1.0000010000000000000000000000000000000000001p0f == 1)
|
86 |
|
|
link_failure ();
|
87 |
|
|
if (0x1.00000100000000000000000000000000000000000001p0f == 1)
|
88 |
|
|
link_failure ();
|
89 |
|
|
if (0x1.000001000000000000000000000000000000000000001p0f == 1)
|
90 |
|
|
link_failure ();
|
91 |
|
|
if (0x1.0000010000000000000000000000000000000000000001p0f == 1)
|
92 |
|
|
link_failure ();
|
93 |
|
|
if (0x1.00000100000000000000000000000000000000000000001p0f == 1)
|
94 |
|
|
link_failure ();
|
95 |
|
|
if (0x1.000001000000000000000000000000000000000000000001p0f == 1)
|
96 |
|
|
link_failure ();
|
97 |
|
|
if (0x1.0000010000000000000000000000000000000000000000001p0f == 1)
|
98 |
|
|
link_failure ();
|
99 |
|
|
if (0x1.00000100000000000000000000000000000000000000000001p0f == 1)
|
100 |
|
|
link_failure ();
|
101 |
|
|
if (0x1.000001000000000000000000000000000000000000000000001p0f == 1)
|
102 |
|
|
link_failure ();
|
103 |
|
|
if (0x1.0000010000000000000000000000000000000000000000000001p0f == 1)
|
104 |
|
|
link_failure ();
|
105 |
|
|
if (0x1.00000100000000000000000000000000000000000000000000001p0f == 1)
|
106 |
|
|
link_failure ();
|
107 |
|
|
if (0x1.000001000000000000000000000000000000000000000000000001p0f == 1)
|
108 |
|
|
link_failure ();
|
109 |
|
|
if (0x1.0000010000000000000000000000000000000000000000000000001p0f == 1)
|
110 |
|
|
link_failure ();
|
111 |
|
|
#endif
|
112 |
|
|
return 0;
|
113 |
|
|
}
|