PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp19.c
blob40373fde163bee41af7947d2d38663bfbd45200b
1 /* { dg-do compile } */
2 /* { dg-options "-fwrapv -O1 -ftree-vrp -fdisable-tree-evrp -fdump-tree-vrp1" } */
4 #include <limits.h>
5 extern void abort ();
6 extern void exit (int);
8 int f (int a) {
9 if (a != INT_MIN) {
10 a = a > 0 ? a : -a;
11 if (a < 0)
12 return 1;
14 return 0;
17 int g (int b) {
18 if (b != INT_MIN) {
19 b = b > 0 ? b : -b;
20 if (b >= 0)
21 return 0;
23 return 1;
25 /* { dg-final { scan-tree-dump "Folding predicate a_. < 0 to 0" "vrp1" } } */
26 /* { dg-final { scan-tree-dump "Folding predicate b_. >= 0 to 1" "vrp1" } } */