Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr91734.c
blob1cc3e40ccbc023e097e493c1100e4d61969f12c7
1 /* PR tree-optimization/91734 */
2 /* { dg-do run } */
3 /* { dg-add-options ieee } */
4 /* { dg-additional-options "-O2 -std=gnu99" } */
6 __attribute__((noipa, optimize ("Ofast"))) int
7 f1 (float x)
9 return __builtin_sqrtf (x) < __FLT_MIN__;
12 __attribute__((noipa, optimize ("Ofast"))) int
13 f2 (float x)
15 return __builtin_sqrtf (x) < 0x1.2dd3d0p-65f;
18 __attribute__((noipa, optimize ("Ofast"))) int
19 f3 (float x)
21 return __builtin_sqrtf (x) >= 0x1.2dd3d0p-65f;
24 __attribute__((noipa, optimize ("Ofast"))) int
25 f4 (float x)
27 return __builtin_sqrtf (x) >= 0x1.5642e6p+54f;
30 __attribute__((noipa, optimize ("Ofast"))) int
31 f5 (float x)
33 return __builtin_sqrtf (x) > 0x1.5642e6p+54f;
36 __attribute__((noipa, optimize ("Ofast"))) int
37 f6 (float x)
39 return __builtin_sqrtf (x) < 0x1.4da1cp-19f;
42 __attribute__((noipa, optimize ("Ofast"))) int
43 f7 (float x)
45 return __builtin_sqrtf (x) <= 0x1.4da1cp-19f;
48 __attribute__((noipa, optimize ("Ofast"))) int
49 f8 (float x)
51 return __builtin_sqrtf (x) < 0x1.50cb62p-65f;
54 __attribute__((noipa, optimize ("Ofast"))) int
55 f9 (float x)
57 return __builtin_sqrtf (x) <= 0x1.4fc00cp-73f;
60 __attribute__((noipa, optimize ("Ofast"))) int
61 f10 (float x)
63 return __builtin_sqrtf (x) < 0x1.001002p+0f;
66 int
67 main ()
69 if (__FLT_RADIX__ != 2
70 || __FLT_MANT_DIG__ != 24
71 || __FLT_MIN_EXP__ != -125
72 || __FLT_MAX_EXP__ != 128
73 || __FLT_HAS_DENORM__ != 1
74 || __FLT_HAS_INFINITY__ != 1)
75 return 0;
76 if (!f1 (0.0f) || f1 (0x1.0p-149f))
77 __builtin_abort ();
78 if (!f2 (0x1.63dbc0p-130f))
79 __builtin_abort ();
80 if (f3 (0x1.63dbc0p-130f))
81 __builtin_abort ();
82 if (!f4 (0x1.c996d0p+108f) || !f4 (0x1.c996cep+108f) || f4 (0x1.c996ccp+108f))
83 __builtin_abort ();
84 if (f5 (0x1.c996d0p+108f) || f5 (0x1.c996d2p+108f) || !f5 (0x1.c996d4p+108f))
85 __builtin_abort ();
86 if (!f6 (0x1.b2ce3p-38f) || f6 (0x1.b2ce32p-38f) || f6 (0x1.b2ce34p-38f))
87 __builtin_abort ();
88 if (!f7 (0x1.b2ce3p-38f) || !f7 (0x1.b2ce34p-38f) || !f7 (0x1.b2ce36p-38f) || f7 (0x1.b2ce38p-38f))
89 __builtin_abort ();
90 if (!f8 (0x1.bb166p-130f) || !f8 (0x1.bb168p-130f) || f8 (0x1.bb16ap-130f) || f8 (0x1.bb16cp-130f))
91 __builtin_abort ();
92 if (!f9 (0x1.8p-146f) || !f9 (0x1.ap-146f) || f9 (0x1.cp-146f) || f9 (0x1.ep-146f))
93 __builtin_abort ();
94 if (f10 (0x1.002004p+0f))
95 __builtin_abort ();
96 return 0;