Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / pr45259.c
blob3b8d6bd176db13ffe5a88d714f80e5ce8a11ad24
1 /* PR debug/45259 */
2 /* { dg-do compile } */
3 /* { dg-options "-g -O2 -w -fpic" { target fpic } } */
4 /* { dg-options "-g -O2 -w" { target { ! fpic } } } */
6 struct S { void (*bar) (long); };
7 struct T { struct S *t; };
8 int w;
9 extern int baz (int);
11 void
12 foo (int x, int u, char *z)
14 struct T *v;
15 static void *y[256] = { &&l1, &&l2 };
16 for (;;)
17 switch (x)
19 l2:
20 x = 9;
21 case 9:
22 goto *y[*z++];
23 case 10:
24 case 27:
25 case 54:
26 case 99:
27 case 100:
28 case 120:
29 case 122:
30 case 131:
31 case 132:
32 case 134:
33 case 141:
34 case 142:
35 v->t->bar (u);
36 v->t->bar (u);
37 case 143:
38 continue;
39 l1:
40 default:
41 baz (w);