Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr107967-3.c
blob9b36a1f7853a50678b401a45d947f77c78a33b3d
1 /* PR tree-optimization/107967 */
2 /* { dg-do compile { target float64 } } */
3 /* { dg-options "-O2 -fno-rounding-math -fno-trapping-math -fdump-tree-optimized" } */
4 /* { dg-add-options float64 } */
5 /* { dg-final { scan-tree-dump-times "return\[ \t]\*-?Inf;" 3 "optimized" } } */
7 _Float64
8 foo (_Float64 x)
10 if (x >= 1.0e+300f64)
12 else
13 __builtin_unreachable ();
14 return x * x;
17 _Float64
18 bar (_Float64 x)
20 if (x >= 1.0e+300f64)
22 else
23 __builtin_unreachable ();
24 return x * -x;
27 _Float64
28 baz (_Float64 a, _Float64 b)
30 if (a >= 0x1.fffffffffffffp+1023f64)
32 else
33 __builtin_unreachable ();
34 if (b >= 0x1.p+972f64)
36 else
37 __builtin_unreachable ();
38 return a + b;
41 _Float64
42 qux (_Float64 a, _Float64 b)
44 if (a >= 0x1.fffffffffffffp+1023f64)
46 else
47 __builtin_unreachable ();
48 if (b >= 0x1.fffffffffffffp+969f64)
50 else
51 __builtin_unreachable ();
52 return a + b;