OSDN Git Service

PR tree-optimization/29290
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Oct 2006 07:27:28 +0000 (07:27 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Oct 2006 07:27:28 +0000 (07:27 +0000)
* tree-loop-linear.c (linear_transform_loops): Bail if loop_nest has
multiple exits.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117484 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 59bafde..ace6a48 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 5027cb4..4754970 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 e0f5bd2..2ef7eac 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);