1 /* { dg-do link } */
2 /* { dg-options "-O2 -fno-tree-switch-conversion" } */
3
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. */
6
7 extern void link_error (void);
8
9 void
f3(int s)10 f3 (int s)
11 {
12 if (s >> 3 == -2)
13 /* s in range [ -16, -9]. */
14 ;
15 else
16 {
17 /* s in range ~[-16, -9], so none of the case labels can be taken. */
18 switch (s)
19 {
20 case -16:
21 case -12:
22 case -9:
23 link_error ();
24 break;
25 default:
26 break;
27 }
28 }
29 }
30
31 int
main()32 main ()
33 {
34 return 0;
35 }
36