summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr46883.c
blob: db8527d5452c4874c76a0372e605a93831522d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
void bar (unsigned char *q, unsigned short *data16s, int len)
{
  int i;

  for (i = 0; i < len; i++)
    {
      q[2 * i] =
        (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF)) & 0xFF;
      q[2 * i + 1] =
        ((unsigned short)
         (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF))) >> 8;
    }
}