Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / ieee / inf-2.c
blob40270c0f6abcb8bd2e1a7d0e452b8e4fc61bc561
1 extern void abort (void);
3 void test(double f, double i)
5 if (f == __builtin_inf())
6 abort ();
7 if (f == -__builtin_inf())
8 abort ();
9 if (i == -__builtin_inf())
10 abort ();
11 if (i != __builtin_inf())
12 abort ();
14 if (f >= __builtin_inf())
15 abort ();
16 if (f > __builtin_inf())
17 abort ();
18 if (i > __builtin_inf())
19 abort ();
20 if (f <= -__builtin_inf())
21 abort ();
22 if (f < -__builtin_inf())
23 abort ();
26 void testf(float f, float i)
28 if (f == __builtin_inff())
29 abort ();
30 if (f == -__builtin_inff())
31 abort ();
32 if (i == -__builtin_inff())
33 abort ();
34 if (i != __builtin_inff())
35 abort ();
37 if (f >= __builtin_inff())
38 abort ();
39 if (f > __builtin_inff())
40 abort ();
41 if (i > __builtin_inff())
42 abort ();
43 if (f <= -__builtin_inff())
44 abort ();
45 if (f < -__builtin_inff())
46 abort ();
49 void testl(long double f, long double i)
51 if (f == __builtin_infl())
52 abort ();
53 if (f == -__builtin_infl())
54 abort ();
55 if (i == -__builtin_infl())
56 abort ();
57 if (i != __builtin_infl())
58 abort ();
60 if (f >= __builtin_infl())
61 abort ();
62 if (f > __builtin_infl())
63 abort ();
64 if (i > __builtin_infl())
65 abort ();
66 if (f <= -__builtin_infl())
67 abort ();
68 if (f < -__builtin_infl())
69 abort ();
72 int main()
74 test (34.0, __builtin_inf());
75 testf (34.0f, __builtin_inff());
76 testf (34.0l, __builtin_infl());
77 return 0;