]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/42246 (ICE in init_seqno for 186.crafty with sel-sched)
authorAndrey Belevantsev <abel@gcc.gnu.org>
Thu, 14 Jan 2010 11:22:20 +0000 (14:22 +0300)
committerAndrey Belevantsev <abel@gcc.gnu.org>
Thu, 14 Jan 2010 11:22:20 +0000 (14:22 +0300)
        PR rtl-optimization/42246
        * sel-sched-ir.h (get_all_loop_exits): Include exits from inner
        loops.

From-SVN: r155900

gcc/ChangeLog
gcc/sel-sched-ir.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr42246-2.f [new file with mode: 0644]

index b45aa5ab753c26c68be2eff1ee2cff5f17aae870..b9b1b32a8da492837d4585aaa9cbbb8b91b39287 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-14  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/42246
+       * sel-sched-ir.h (get_all_loop_exits): Include exits from inner
+       loops.
+
 2010-01-14  Andrey Belevantsev  <abel@ispras.ru>
 
        * sel-sched.c (compute_av_set_at_bb_end): Do not test that number of
index 0d8b0fcb1ee8d3eddb4e28c0b2a703de64833d83..b5121c07d6c6f104199fa74a165691c13e9f1b80 100644 (file)
@@ -1147,7 +1147,8 @@ get_all_loop_exits (basic_block bb)
 
       /* Traverse all loop headers.  */
       for (i = 0; VEC_iterate (edge, exits, i, e); i++)
-       if (in_current_region_p (e->dest))
+       if (in_current_region_p (e->dest)
+           || inner_loop_header_p (e->dest))
          {
            VEC(edge, heap) *next_exits = get_all_loop_exits (e->dest);
 
index d6f013e2b44538a79f319539b3d76a4bf6f2a663..341c535cf6dc7b0db803de19eeec2b7875f6f2af 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-14  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/42246
+       * gfortran.dg/pr42246-2.f: New.
+
 2010-01-14  Alexander Monakov  <amonakov@ispras.ru>
 
        PR rtl-optimization/42389
diff --git a/gcc/testsuite/gfortran.dg/pr42246-2.f b/gcc/testsuite/gfortran.dg/pr42246-2.f
new file mode 100644 (file)
index 0000000..885e3a4
--- /dev/null
@@ -0,0 +1,21 @@
+C PR rtl-optimization/42246
+C { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } }
+C { dg-options "-O2 -fselective-scheduling -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops" }
+
+      subroutine distance(x,clo)
+      implicit real*8 (a-h,o-z)
+      dimension x(2,6),x1(2,6),clo(6)
+      do 60 i=1,2
+        do 20 j=1,6
+          x(i,j)=clo(j)
+   20   continue
+        do 40 iq=1,6
+          x1(i,iq)=0.0d0
+   40   continue
+        do 50 j=1,6
+          x(i,j)=x1(i,j)
+   50   continue
+   60 continue
+      return
+      end
+