131
|
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
|
|
6 int bar (int);
|
|
7 void link_error (void);
|
|
8
|
|
9 int
|
|
10 foo (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 }
|