diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f93230a..93b5b84 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2008-03-14 Richard Guenther <rguenther@suse.de> + PR tree-optimization/13761 + * gcc.dg/tree-ssa/ssa-lim-3.c: New testcase. + +2008-03-14 Richard Guenther <rguenther@suse.de> + PR tree-optimization/34172 * gcc.dg/tree-ssa/ssa-fre-11.c: New testcase. * gcc.dg/tree-ssa/ssa-fre-12.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c new file mode 100644 index 0000000..bfd8692 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-lim-details -fdump-tree-optimized" } */ + +struct { int x; int y; } global; +void foo(int n) +{ + int i; + for ( i=0; i<n; i++) + global.y += global.x*global.x; +} + +/* { dg-final { scan-tree-dump "Executing store motion of global.y" "lim" } } */ +/* { dg-final { scan-tree-dump "Moving statement.*global.x.*out of loop 1" "lim" } } */ +/* { dg-final { cleanup-tree-dump "lim" } } */ |