Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr106819.c

raw
1 // { dg-do compile }
2 // { dg-options "-O2 -fdump-tree-evrp-details" }
3
4 static int isNaN(double x)
5 {
6 return x != x;
7 }
8
9 static double opCmpProper(int lhs, double rhs)
10 {
11 return lhs < rhs ? -1.0
12 : lhs > rhs ? 1.0
13 : lhs == rhs ? 0.0
14 : __builtin_nan("");
15 }
16
17 int main()
18 {
19 if (!isNaN(opCmpProper(41, __builtin_nan(""))))
20 __builtin_abort();
21 return 0;
22 }
23
24 // { dg-final {scan-tree-dump-not "Folds to: 0.0" "evrp" } }