]>
Commit | Line | Data |
---|---|---|
0676c393 | 1 | /* { dg-do run } */ |
88961471 | 2 | /* { dg-options "-falign-labels=8" } */ |
0676c393 MM |
3 | |
4 | /* On ARMv7-A CPUs, this test resulted in incorrect code generation. | |
5 | The code generated for the switch statement expected the jump table | |
6 | to immediately follow the jump instruction, but -falign-labels | |
7 | caused the label preceding the table to be aligned. */ | |
8 | /* M68K and fido only support -falign-labels argument <= 2. */ | |
9 | ||
10 | volatile int x; | |
11 | ||
12 | int main(void) | |
13 | { | |
14 | int y; | |
15 | ||
16 | x = 0; | |
17 | ||
18 | switch(x) | |
19 | { | |
20 | case 0: | |
21 | y = 2 * x; | |
22 | break; | |
23 | case 1: | |
24 | y = -3 * x; | |
25 | break; | |
26 | case 2: | |
27 | y = x + 5; | |
28 | break; | |
29 | case 3: | |
30 | y = x - 7; | |
31 | break; | |
32 | default: | |
33 | break; | |
34 | } | |
35 | ||
36 | x = y; | |
37 | ||
38 | return 0; | |
39 | } |