]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/vrp119.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp119.c
CommitLineData
c81a5aec
JJ
1/* PR tree-optimization/86231 */
2/* { dg-do compile } */
3/* { dg-options "-O2 -fdump-tree-vrp1" } */
4/* { dg-final { scan-tree-dump-not "link_error" "vrp1" } } */
5
6int bar (int);
7void link_error (void);
8
9int
10foo (int x, int y, int z)
11{
12 if (x < 4 || x > 8) __builtin_unreachable ();
13 if (y >= 2 && y <= 6) __builtin_unreachable ();
14 /* x is [4, 8], y is ~[2, 6], resulting range of e should be ~[2, 3]. */
15 int e = (z ? x : y);
16 bar (bar (bar (bar (bar (bar (bar (bar (bar (bar (bar (bar (e))))))))))));
17 if (e == 2 || e == 3)
18 link_error ();
19 return e;
20}