forwprop-1.c: New testcase.

2007-05-18  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * gcc.dg/tree-ssa/forwprop-1.c: New testcase.

From-SVN: r124840
This commit is contained in:
Andrew Pinski 2007-05-18 23:37:06 +00:00 committed by Andrew Pinski
parent 8d5b1b6786
commit 2d26b7183c
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-05-18 Andrew Pinski <andrew_pinski@playstation.sony.com>
* gcc.dg/tree-ssa/forwprop-1.c: New testcase.
2007-05-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/31628

View File

@ -0,0 +1,22 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-forwprop" } */
/* We should be able to optimize this to b->t[i] = 1 during
early optimizations. */
struct a
{
int t[10];
};
void f(struct a * b, __SIZE_TYPE__ i)
{
int *c = b->t;
c[i] = 1;
}
/* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop1" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop2" } } */
/* { dg-final { cleanup-tree-dump "forwprop?" } } */