re PR tree-optimization/29290 (SPEC CPU2000 178.galgel ICE using -O3 -ftree-loop...
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Oct 2006 07:27:28 +0000 (09:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Oct 2006 07:27:28 +0000 (09:27 +0200)
PR tree-optimization/29290
* tree-loop-linear.c (linear_transform_loops): Bail if loop_nest has
multiple exits.

* gfortran.dg/loop_nest_1.f90: New test.

From-SVN: r117484

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/loop_nest_1.f90 [new file with mode: 0644]
gcc/tree-loop-linear.c

index 59bafdec7ffcdf1724235c6dca318d9bd1ab4031..ace6a48e3f978d7892dd2319d48e82194f596b08 100644 (file)
@@ -1,5 +1,9 @@
 2006-10-06  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/29290
+       * tree-loop-linear.c (linear_transform_loops): Bail if loop_nest has
+       multiple exits.
+
        PR target/29198
        * config/i386/i386.c (legitimize_pic_address): Reject TLS symbols.
        * config/i386/predicates.md (local_symbolic_operand): Likewise.
index 5027cb4f5716836566b62fe88a0da62c126580f7..4754970e48c149b1dc764e835fcda4597c35909e 100644 (file)
@@ -1,5 +1,8 @@
 2006-10-06  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/29290
+       * gfortran.dg/loop_nest_1.f90: New test.
+
        PR target/29198
        * gcc.dg/tls/opt-12.c: New test.
 
diff --git a/gcc/testsuite/gfortran.dg/loop_nest_1.f90 b/gcc/testsuite/gfortran.dg/loop_nest_1.f90
new file mode 100644 (file)
index 0000000..8968d88
--- /dev/null
@@ -0,0 +1,9 @@
+! PR tree-optimization/29290
+! { dg-do compile }
+! { dg-options "-O3 -ftree-loop-linear" }
+
+subroutine pr29290 (a, b, c, d)
+  integer c, d
+  real*8 a(c,c), b(c,c)
+  a(1:d,1:d) = b(1:d,1:d)
+end
index e0f5bd2991bdd757c72dc18ba7c6782bc25c5324..2ef7eacec13cfa3f7ae20c8108167e7de38d3a60 100644 (file)
@@ -265,12 +265,12 @@ linear_transform_loops (struct loops *loops)
                {
                ...
                }
-           for (j = 0; j < 50; j++)
+             for (j = 0; j < 50; j++)
                {
                 ...
                }
            } */
-      if (!loop_nest || !loop_nest->inner)
+      if (!loop_nest || !loop_nest->inner || !loop_nest->single_exit)
        continue;
       VEC_truncate (tree, oldivs, 0);
       VEC_truncate (tree, invariants, 0);