Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/lto/pr60911_0.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/lto/pr60911_0.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,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; +}