Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp76.c
blobc8b8595c6be5c64b948b9f82e1146de5a435fe1a
1 /* { dg-do link } */
2 /* { dg-options "-O2 -fno-tree-switch-conversion" } */
4 /* Based on f3 from vrp63.c, but with switch instead of if-chain. This test
5 tests the propagation of an anti-range in a switch statement. */
7 extern void link_error (void);
9 void
10 f3 (int s)
12 if (s >> 3 == -2)
13 /* s in range [ -16, -9]. */
15 else
17 /* s in range ~[-16, -9], so none of the case labels can be taken. */
18 switch (s)
20 case -16:
21 case -12:
22 case -9:
23 link_error ();
24 break;
25 default:
26 break;
31 int
32 main ()
34 return 0;