From: Richard Guenther Date: Tue, 21 Oct 2008 12:15:55 +0000 (+0000) Subject: alias-19.c: New testcase. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=106580684f1027790dd169adea22d06b76ad7b35;p=platform%2Fupstream%2Fgcc.git alias-19.c: New testcase. 2008-10-21 Richard Guenther * gcc.dg/tree-ssa/alias-19.c: New testcase. From-SVN: r141261 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3075046..e65e725 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-10-21 Richard Guenther + + * gcc.dg/tree-ssa/alias-19.c: New testcase. + 2008-10-20 Manuel López-Ibáñez PR 12603 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c new file mode 100644 index 0000000..b92df43 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c @@ -0,0 +1,31 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -fdump-tree-alias-vops" } */ + +const static int a; + +int __attribute__((noinline)) +foo(int i) +{ + const int *q; + int b; + if (i) + q = &a; + else + q = &b; + b = 1; + /* We should not prune a from the points-to set of q. */ + return *q; +} + +extern void abort (void); +int main() +{ + if (foo(1) != 0) + abort (); + return 0; +} + +/* { dg-final { scan-tree-dump "q_. = { a b }" "alias" } } */ +/* { dg-final { scan-tree-dump "q_., name memory tag: NMT..., is dereferenced, points-to vars: { a b }" "alias" } } */ +/* { dg-final { scan-tree-dump "# VUSE " "alias" } } */ +/* { dg-final { cleanup-tree-dump "alias" } } */