1 /* { dg-do run } */
2 /* { dg-options "-O2 -fomit-frame-pointer" } */
3 
4 extern void abort (void);
5 extern void exit (int);
6 
7 unsigned char a[256], b[256], c[256], d[256];
8 
foo(unsigned char * x,int y,unsigned char * z)9 void foo(unsigned char *x, int y, unsigned char *z)
10 {
11 }
12 
bar(int x,...)13 void bar(int x, ...)
14 {
15 }
16 
baz(int y)17 void baz(int y)
18 {
19   if (y != 0x10)
20     abort();
21 }
22 
test(int x,unsigned char * y)23 void test(int x, unsigned char *y)
24 {
25   unsigned char g,h,j, k[5],l[5], m[30];
26   int i;
27 
28   bar(x, y[0], y[1], y[2], y[3], y[4], y[5], y[6], y[7], y[8], y[9]);
29   for (i = 5; --i >= 0; )
30     k[i] = y[5 + i] ^ a[i] ^ c[i];
31 
32   foo(&m[29], sizeof m, k);
33   g = d[x] ^ c[x];
34   bar(x, d[x], x, c[x]);
35   baz(g);
36   for (i = 5, h = 0; --i >= 0; h = y[i])
37     {
38       j = m[25 + i] ^ y[i];
39       j = b[j] ^ g;
40       k[i] = c[j] ^ h;
41     }
42   for (i = 5, h = 0; --i >= 0; h = k[i])
43     {
44       j = m[20 + i] ^ k[i];
45       j = b[j] ^ g;
46       l[i] = c[j] ^ h;
47     }
48   for (i = 5, h = 0; --i >= 0; h = l[i]) {
49     j = m[15 + i] ^ l[i];
50     j = b[j] ^ g;
51     j = c[j] ^ h;
52     k[i] = a[j] ^ c[j];
53   }
54 }
55 
main()56 int main()
57 {
58   c[4] = 0xdc;
59   d[4] = 0xcc;
60   test(4, a);
61   exit(0);
62 }
63