aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/ac.c
blob: 4191116642c3686fde202ff3a2be709ed3f2a382 (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
/* { dg-additional-options "-std=gnu89" } */

barfoo (a)
{
  return (a << 16) & ~0xffff;
}

foobar (a)
{
  return ((unsigned short) a) << 15;}

foo (a)
{
  return (a & 0x121) << 31;
}

bar (a)
{
  return (a & ~0xffff) << 16;
}

main ()
{
  int a;

  for (a = 1;  a; a += a)
    {
      printf ("%d", (foo (a)));
    }
  puts ("");
}