summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/960802-1.c
blob: f9ee75260be377d95833795c4b34e853d0084ff7 (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
36
long val = 0x5e000000;

long
f1 (void)
{
  return 0x132;
}

long
f2 (void)
{
  return 0x5e000000;
}

void
f3 (long b)
{
  val = b;
}

void
f4 ()
{
  long v = f1 ();
  long o = f2 ();
  v = (v & 0x00ffffff) | (o & 0xff000000);
  f3 (v);
}

main ()
{
  f4 ();
  if (val != 0x5e000132)
    abort ();
  exit (0);
}