PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp54.c
blobad87288e3a3b0dddeee53eabc127751e74836c6d
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
4 extern void link_error (void);
5 void foo (void)
7 int j = 256;
8 do
10 if (j < 0 || j > 256)
11 link_error ();
12 j--;
14 while (j >= 0);
15 if (j != -1)
16 link_error ();
18 extern void link_error (void);
19 void bar (void)
21 int j = 0;
24 if (j < 0 || j > 256)
25 link_error ();
26 j++;
28 while (j <= 256);
29 if (j != 257)
30 link_error ();
33 /* { dg-final { scan-tree-dump-not "link_error" "vrp1" } } */