* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr65153.c
blob3cc0df6947d07e839af7318542dee287d39b6fb3
1 /* { dg-additional-options "-fPIC" { target fpic } } */
3 typedef unsigned long word32;
4 typedef unsigned char byte;
5 typedef struct cast256_instance { word32 l_key[96];} cast256_key;
6 word32 cast256_sbox[4][256] = {};
7 void
8 key (cast256_key *key, const word32 *in_key, const int key_len)
10 word32 i, j, t, u, cm, cr, lk[8], tm[8], tr[8];
11 for (i = 0; i < 96; i += 8)
13 for (j = 0; j < 8; ++j)
15 tm[j] = cm;
16 cm += 0x6ed9eba1;
17 tr[j] = cr;
18 cr += 17;
20 t = (((tm[0] + lk[7]) << ((word32)(tr[0] & 31)))
21 | ((tm[0] + lk[7]) >> (32 - (word32)(tr[0] & 31))));
22 u = cast256_sbox[0][((byte)((t) >> (8 * 3)))];
23 u ^= cast256_sbox[1][((byte)((t) >> (8 * 2)))];
24 lk[7] ^= u;
25 for (j = 0; j < 8; ++j)
27 cm += 0x6ed9eba1;
28 tr[j] = cr;
29 cr += 17;
31 t = (((tm[0] + lk[7]) << ((word32)(tr[0] & 31)))
32 | ((tm[0] + lk[7]) >> (32 - (word32)(tr[0] & 31))));
33 u = cast256_sbox[0][((byte)((t) >> (8 * 3)))];
34 u ^= cast256_sbox[1][((byte)((t) >> (8 * 2)))];
35 u -= cast256_sbox[2][((byte)((t) >> (8 * 1)))];
36 lk[2] ^= u;
37 lk[7] ^= u;
38 key->l_key[i + 1] = lk[2];