alias-19.c: New testcase.

2008-10-21  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/tree-ssa/alias-19.c: New testcase.

From-SVN: r141261
This commit is contained in:
Richard Guenther 2008-10-21 12:15:55 +00:00 committed by Richard Biener
parent 90e0256979
commit 106580684f
2 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2008-10-21 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/alias-19.c: New testcase.
2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 12603

View File

@ -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 <a_.\\\(D\\\), b_.>" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */