OSDN Git Service

PR c/21720
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / hex-round-1.c
1 /* 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.000001000000000000000000000000000001p0f == 1)
14     link_failure ();
15   if (0x1.0000010000000000000000000000000000001p0f == 1)
16     link_failure ();
17   if (0x1.00000100000000000000000000000000000001p0f == 1)
18     link_failure ();
19   if (0x1.000001000000000000000000000000000000001p0f == 1)
20     link_failure ();
21   if (0x1.0000010000000000000000000000000000000001p0f == 1)
22     link_failure ();
23   if (0x1.00000100000000000000000000000000000000001p0f == 1)
24     link_failure ();
25   if (0x1.000001000000000000000000000000000000000001p0f == 1)
26     link_failure ();
27   if (0x1.0000010000000000000000000000000000000000001p0f == 1)
28     link_failure ();
29 #endif
30   return 0;
31 }