[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / vrp-min-max-1.c
blob270f2bbb4364b548db3e074156e9ab9dcf8016f9
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-mergephi2" } */
4 int bar (void);
6 int foo1 (int x, int y)
8 if (y < 10) return bar ();
9 if (x > 9) return bar ();
11 return x < y ? x : y;
14 int foo2 (int x, int y)
16 if (y < 10) return bar ();
17 if (x > 9) return bar ();
19 return x > y ? x : y;
22 /* We expect to optimiz min/max in VRP*/
24 /* { dg-final { scan-tree-dump-times "MIN_EXPR" 1 "mergephi2" } } */
25 /* { dg-final { scan-tree-dump-times "MAX_EXPR" 1 "mergephi2" } } */
26 /* { dg-final { scan-tree-dump-not "MIN_EXPR" "vrp1" } } */
27 /* { dg-final { scan-tree-dump-not "MAX_EXPR" "vrp1" } } */