comparison gcc/testsuite/gcc.dg/tree-ssa/vrp119.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
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 }