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