Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr56809.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR target/56809 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Os" } */ | |
4 | |
5 int | |
6 foo (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 } |