PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr56510.c
blobd018d7d4baa9a5591eb151c5ca5dc4689b290cb2
1 /* PR debug/56510 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -g" } */
5 __extension__ typedef __INTPTR_TYPE__ intptr_t;
6 struct S { unsigned long s1; void **s2[0]; };
7 void **a, **b, **c, **d, **e, **f;
9 static void **
10 baz (intptr_t x, intptr_t y)
12 void **s = f;
13 *f = (void **) (y << 8 | (x & 0xff));
14 f += y + 1;
15 return s;
18 void bar (void);
19 void
20 foo (void)
22 void **g = b[4];
23 a = b[2];
24 b = b[1];
25 g[2] = e;
26 void **h
27 = ((void **************************)
28 a)[1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][66];
29 void **i = ((struct S *) h)->s2[4];
30 d = baz (4, 3);
31 d[1] = b;
32 d[2] = a;
33 d[3] = bar;
34 b = d;
35 g[1] = i[2];
36 a = g;
37 ((void (*) (void)) (i[1])) ();