IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / 20001023-1.c
blob10cb27259396eaf7600eec7e71727bec43639ab3
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fomit-frame-pointer" } */
4 extern void abort (void);
5 extern void exit (int);
7 unsigned char a[256], b[256], c[256], d[256];
9 void foo(unsigned char *x, int y, unsigned char *z)
13 void bar(int x, ...)
17 void baz(int y)
19 if (y != 0x10)
20 abort();
23 void test(int x, unsigned char *y)
25 unsigned char g,h,j, k[5],l[5], m[30];
26 int i;
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];
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])
38 j = m[25 + i] ^ y[i];
39 j = b[j] ^ g;
40 k[i] = c[j] ^ h;
42 for (i = 5, h = 0; --i >= 0; h = k[i])
44 j = m[20 + i] ^ k[i];
45 j = b[j] ^ g;
46 l[i] = c[j] ^ h;
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];
56 int main()
58 c[4] = 0xdc;
59 d[4] = 0xcc;
60 test(4, a);
61 exit(0);