Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/range-sincos-2.c

raw
1 // { dg-do compile }
2 // { dg-options "-O2 -fdump-tree-evrp -fno-thread-jumps" }
3
4 void use (double);
5 void link_error ();
6
7 void
8 foo (double x)
9 {
10 double y;
11 if (x >= 0.5 && x <= 1.3)
12 {
13 y = __builtin_sin (x);
14 if (y < 0.45 || y > 0.97)
15 link_error ();
16 use (y);
17 }
18 if (x >= 0.5 && x < 1.75)
19 {
20 y = __builtin_sin (x);
21 if (y < 0.45 || y > 1.05)
22 link_error ();
23 use (y);
24 }
25 if (x >= -1.57 && x <= 1.57)
26 {
27 y = __builtin_cos (x);
28 if (y < 0.0007 || y > 1.05)
29 link_error ();
30 use (y);
31 }
32 }
33
34 // { dg-final { scan-tree-dump-not "link_error" "evrp" { target { { *-*-linux* } && { glibc } } } } }