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, committed] Testcase for PR 32964


Hi,

new SRA fixed regression filed as PR 32964.  I removed the 4.5
regression tag from its summary and added the following testcase to
trunk (I hope it's reasonable to do this without an approval).

Thanks,

Martin

2009-08-06  Martin Jambor  <mjambor@suse.cz>

       PR middle-end/32964
       * testsuite/gcc.dg/tree-ssa/pr32964.c: New test.


Index: gcc/testsuite/gcc.dg/tree-ssa/pr32964.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr32964.c     (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr32964.c     (revision 150523)
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+union A
+{
+ float a;
+};
+
+float t(float a)
+{
+  union A a1, a2, a3;
+  int i;
+
+  a1.a = a;
+  for(i = 0; i<100; i++)
+    {
+      a2 = a1;
+      a2.a += a;
+      a1 = a2;
+  }
+  a3 = a1;
+  return a3.a;
+}
+
+/* { dg-final { scan-tree-dump-times "union" 0 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */


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