aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr43879_1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr43879_1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr43879_1.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr43879_1.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr43879_1.c
new file mode 100644
index 000000000..151a184cb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr43879_1.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-fipa-pta" } */
+/* { dg-additional-sources "pr43879_2.c" } */
+
+void bar(int c)
+{
+ static int x = 1;
+ if (c != x) __builtin_abort();
+ x--;
+}
+
+void baz(int *i)
+{
+ (*i)--;
+}
+
+struct TBL {
+ int (*p)(int *i);
+};
+extern struct TBL tbl;
+
+int main()
+{
+ int c = 1;
+ return tbl.p(&c);
+}
+