1 /* PR rtl-optimization/18861 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4
5 extern void abort (void);
6
7 int
foo(int code)8 foo (int code)
9 {
10 if (code >= 3)
11 switch (code)
12 {
13 case 3: return 4;
14 case 4: return 3;
15 case 5: return 6;
16 case 6: return 7;
17 case 7: return 8;
18 case 8: return 5;
19 default: abort ();
20 }
21 switch (code)
22 {
23 case 3: return 4;
24 case 4: return 3;
25 case 5: return 6;
26 case 6: return 7;
27 case 7: return 8;
28 case 8: return 5;
29 default: abort ();
30 }
31 }
32