1 /* PR target/56809 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-Os" } */ 4 5 int foo(int mode,int i)6foo (int mode, int i) 7 { 8 int x; 9 10 switch (mode) 11 { 12 case 0: 13 x = i + 1; 14 break; 15 case 1: 16 x = i / 2; 17 break; 18 case 2: 19 x = i * 3; 20 break; 21 case 3: 22 x = i + 3; 23 break; 24 case 4: 25 x = i + 5; 26 break; 27 default: 28 x = i - 1; 29 } 30 31 return x; 32 } 33