aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr52533.c
blob: 82753cd73d64479fc730fef96784e8fe45122e1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR tree-optimization/52533 */

int
foo (unsigned char x)
{
  if (x <= 9)
    return '0' + x;
  else if (x <= 15)
    return 'a' + (x - 10);
  else
    return 0;
}

void
bar (unsigned char x, unsigned char *y)
{
  y[0] = foo ((unsigned char) (x >> 4));
  y[1] = foo ((unsigned char) (x & 0x0f));
}