summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr47800.c
blob: 45c817bc6408a84cd376eb119aab7ee1367de039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR target/47800 */
/* { dg-do compile } */
/* { dg-options "-O2 -march=nocona" } */

int
foo (unsigned char *x, unsigned char *y)
{
  unsigned char a;
  for (a = 0; x < y; x++)
    if (a & 0x80)
      a = (unsigned char) (a << 1) + 1 + *x;
    else
      a = (unsigned char) (a << 1) + *x;
  return a;
}