summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/hex-round-1.c
blob: 1ce9c35c0fa0e902645a878adeb14fbefbe3402d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Test for hexadecimal float rounding: bug 21720.  */
/* { dg-do link } */
/* { dg-options "-O -std=gnu99" } */

#include <float.h>

extern void link_failure (void);

int
main (void)
{
#if FLT_RADIX == 2 && FLT_MANT_DIG == 24
  if (0x1.000001000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000000000001p0f == 1)
    link_failure ();
#endif
  return 0;
}