PR rtl-optimization/87918
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr48721.c
blobf37a16949aea8350055296e94b9398acd5f56681
1 /* PR rtl-optimization/48721 */
2 /* { dg-do compile } */
3 /* { dg-options "-O -foptimize-sibling-calls -fsched2-use-superblocks -fschedule-insns2 -mtune=core2" } */
5 extern unsigned char a[];
6 extern int b[], d[], e[], f[], g[], *h[], m[], *n[], o[];
7 extern char c[];
9 struct S
11 unsigned char s1;
12 int s2, s3, s4, s5, s6, s7, s8;
15 __attribute__((noinline, noclone)) int
16 foo (int x)
18 return 0;
21 int
22 bar (int x, struct S *y)
24 int z;
25 switch (x)
27 case 1:
28 case 2:
30 int t2, t4, t5, t6, t7, t8;
31 z = o[y->s8 * 6];
32 t8 = *n[m[x] * 5];
33 t4 = *h[y->s7];
34 t7 = z;
35 z = g[f[x] + y->s6];
36 t6 = e[y->s5];
37 t5 = d[c[x] + y->s3 * 17];
38 if (z)
39 t2 = b[z];
40 if (a[z] != y->s1)
41 return foo (x);
42 y->s8 = t8;
43 y->s4 = t4;
44 y->s7 = t7;
45 y->s6 = t6;
46 y->s5 = t5;
47 y->s2 = t2;
50 return 0;