diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr43879_1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr43879_1.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr43879_1.c b/gcc/testsuite/gcc.dg/torture/pr43879_1.c new file mode 100644 index 000000000..151a184cb --- /dev/null +++ b/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); +} + |