aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c b/gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c
new file mode 100644
index 000000000..e4820a204
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/lto/pr60911_0.c
@@ -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;
+}