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:
parent
90e0256979
commit
106580684f
@ -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
|
||||
|
31
gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
Normal file
31
gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
Normal 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" } } */
|
Loading…
Reference in New Issue
Block a user