aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c
blob: e4820a20497eabab1d9c9a4cb4e421afc627523f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-lto-do run }
// { dg-lto-options { { -O2 -flto -fipa-pta } } }

int __attribute__ ((__noinline__)) f (unsigned *p, int *x)
{
  int y = *p++ & 0xfff;
  *x++ = y;
  *x = *p;
  return y;
}

int
main ()
{
  unsigned u[2] = { 0x3aad, 0x5ad1 };
  int x[2] = { 17689, 23456 };

  if (f (u, x) != 0xaad || x[0] != 0xaad || x[1] != 0x5ad1)
    __builtin_abort ();
  return 0;
}