Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/vrp-float-signbit-2.c

raw
1 // { dg-do compile }
2 // { dg-options "-O2 -fdump-tree-evrp" }
3
4 // Test that the only thing we know about the signbit about negative number is
5 // that it's not 0.
6
7 void link_error ();
8
9 int num;
10
11 void func(float x)
12 {
13 if (x < -5.0)
14 {
15 num = __builtin_signbit (x);
16
17 // We may not know the exact signbit, but we know it's not 0.
18 if (!__builtin_signbit (x))
19 link_error ();
20 }
21 }
22
23 // { dg-final { scan-tree-dump-not "num = \[-0-9\];" "evrp" } }
24 // { dg-final { scan-tree-dump-not "link_error" "evrp" } }