aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr106523.c
blob: abd78f59ce3efb547be945ac3799ad6033970bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR tree-optimization/106523 */

__attribute__((noipa)) unsigned char
f7 (unsigned char x, unsigned int y)
{
  unsigned int t = x;
  return (t << y) | (t >> ((-y) & 7));
}

int
main ()
{
  if (__CHAR_BIT__ != 8 || __SIZEOF_INT__ != 4)
    return 0;

  volatile unsigned char x = 152;
  volatile unsigned int y = 19;
  if (f7 (x, y) != 4)
    __builtin_abort ();

  return 0;
}