Debian Codegraph @

gcc/testsuite/g++.dg/pr83541.C

raw
1 // PR tree-optimization/83541
2 // { dg-do compile }
3 // { dg-options "-O3 -std=c++17 -ffast-math -fdump-tree-evrp" }
4
5 #include <limits>
6
7 int test(int x)
8 {
9 if(x == std::numeric_limits<int>::max())
10 {
11 return x+1;
12 }
13 return 42;
14 }
15
16 // { dg-final { scan-tree-dump "return 42" evrp } }
17 // { dg-final { scan-tree-dump-not "return _" evrp } }