PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr45259.c
blob7a051af811023310ab2fd8bdca9c157ac1b80072
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 } } } */
5 /* { dg-require-effective-target indirect_jumps } */
6 /* { dg-require-effective-target label_values } */
8 struct S { void (*bar) (long); };
9 struct T { struct S *t; };
10 int w;
11 extern int baz (int);
13 void
14 foo (int x, int u, char *z)
16 struct T *v;
17 static void *y[256] = { &&l1, &&l2 };
18 for (;;)
19 switch (x)
21 l2:
22 x = 9;
23 case 9:
24 goto *y[*z++];
25 case 10:
26 case 27:
27 case 54:
28 case 99:
29 case 100:
30 case 120:
31 case 122:
32 case 131:
33 case 132:
34 case 134:
35 case 141:
36 case 142:
37 v->t->bar (u);
38 v->t->bar (u);
39 case 143:
40 continue;
41 l1:
42 default:
43 baz (w);