summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted/xopt.c
blob: b1a50f86cef2c0092649dab03ab5ea865fb3125f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
proc1 (a)
     unsigned a;
{
  return (a >> 20) & 0x010fffff;
}

proc2 (a)
     unsigned a;
{
  return (a << 17) & 0xfffff001;
}

proc3 (a)
     unsigned a;
{
  return (a & 0xff00000a) >> 25;
}

proc4 (a)
     unsigned a;
{
  return (a & 0x100000ff) << 25;
}

proc5 (a)
     unsigned a;
{
  return (unsigned char) (a >> 24);
}

proc6 (a)
     unsigned a;
{
  return ((unsigned char) a) << 30;
}