OSDN Git Service

PR c/10175
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20011107-1.c
1 /* { dg-do compile { target i?86-*-* } } */
2 /* { dg-options "-O2 -mtune=k6" } */
3
4 void
5 foo (unsigned char *x, const unsigned char *y)
6 {
7   int a = 6;
8   unsigned char *b;
9   for (;;)
10     {
11       unsigned char *c = x;
12
13       while (1)
14         {
15           if (c + 2 < y)
16             c += 3;
17           else
18             break;
19         }
20       b = x + a;
21       if (*c == 4 || *c == 5)
22         {
23           unsigned char d = c[2];
24
25           if (b[3] == 7 || b[3] == 8)
26             {
27               int e = b[3] == 8;
28               if (d < b[4] * 8 && b[5 + d / 8] & (1 << (d % 8)))
29                 e = !e;
30               if (!e)
31                 x[-3] = 26;
32             }
33         }
34       else if (*c == 7 && b[3] == 8)
35         {
36           int f;
37           for (f = 0; f < (int) c[1]; f++)
38             if (!(c[2 + f] == 0))
39               break;
40           if (f == c[1])
41             x[-3] = 26;
42         }
43       x -= 2;
44     }
45 }