OSDN Git Service

2005-10-05 Steven Bosscher <stevenb@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr23049.c
1 /* This was an ICE in fold where we tried to fold something like,
2
3      a = 0 == 0 ? 0 : 3988292384
4
5    after doing if-conversion for the vectorizer.  Folding "0 == 0"
6    should have been done before calling fold on the whole rhs of
7    the above expression.  */
8
9 /* { dg-do compile } */
10 /* { dg-options "-O3 -ftree-vectorize" } */
11
12 static unsigned short int crc_table[256];
13 void AC3_encode_init(void)
14 {
15   unsigned int c, n, k;
16   for(n=0;  n<256; n++)
17   {
18     c = n << 8;
19     for (k = 0; k < 8; k++)
20     {
21       if (c & (1 << 15))
22        c = ((c << 1) & 0xffff) ^ (((1 << 0) | (1 << 2) | (1 << 15) | (1 << 16)) & 0xffff);
23     }
24     crc_table[n] = c;
25   }
26 }