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:
parent
8d5b1b6786
commit
2d26b7183c
@ -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
|
||||
|
22
gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
Normal file
22
gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
Normal 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?" } } */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user