summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/hex-round-1.c
blob: e1283cae37b3ad1bbe4b86c3839131a1c40e0d8c (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* Test for hexadecimal float rounding: bug 21720.  */
/* { dg-do link } */
/* { dg-options "-O -std=gnu99" } */
/* { dg-skip-if "SPU float rounds towards zero" { spu-*-* } } */

#include <float.h>

extern void link_failure (void);

int
main (void)
{
#if FLT_RADIX == 2 && FLT_MANT_DIG == 24
  if (0x1.0000011p0f == 1)
    link_failure ();
  if (0x1.00000101p0f == 1)
    link_failure ();
  if (0x1.000001001p0f == 1)
    link_failure ();
  if (0x1.0000010001p0f == 1)
    link_failure ();
  if (0x1.00000100001p0f == 1)
    link_failure ();
  if (0x1.000001000001p0f == 1)
    link_failure ();
  if (0x1.0000010000001p0f == 1)
    link_failure ();
  if (0x1.00000100000001p0f == 1)
    link_failure ();
  if (0x1.000001000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000000001p0f == 1)
    link_failure ();
  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 ();
  if (0x1.00000100000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.00000100000000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.000001000000000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
  if (0x1.0000010000000000000000000000000000000000000000000000001p0f == 1)
    link_failure ();
#endif
  return 0;
}