This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add testcase for fixed PR 13761


Committed.

2008-03-14  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/13761
	* gcc.dg/tree-ssa/ssa-lim-3.c: New testcase.

Index: testsuite/gcc.dg/tree-ssa/ssa-lim-3.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/ssa-lim-3.c	(revision 0)
+++ testsuite/gcc.dg/tree-ssa/ssa-lim-3.c	(revision 0)
@@ -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" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]