]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/48712 (ICE in dfs_enumerate_from, at cfganal.c:1207, with -O3)
authorRichard Guenther <rguenther@suse.de>
Thu, 21 Apr 2011 15:51:39 +0000 (15:51 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 21 Apr 2011 15:51:39 +0000 (15:51 +0000)
2011-04-21  Richard Guenther  <rguenther@suse.de>

PR middle-end/48712
Backport from 4.6 branch
2011-03-07  Zdenek Dvorak  <ook@ucw.cz>

PR bootstrap/48000
* cfgloopmanip.c (fix_bb_placements): Return immediately
if FROM is BASE_LOOP's header.

From-SVN: r172833

gcc/ChangeLog
gcc/cfgloopmanip.c

index d07bf66f17694ec2d191d27299f4f9cbef89d0c1..f08775816f4f71d82cf03e2cf2bcaee6da7cb475 100644 (file)
@@ -1,3 +1,13 @@
+2011-04-21  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/48712
+       Backport from 4.6 branch
+       2011-03-07  Zdenek Dvorak  <ook@ucw.cz>
+
+       PR bootstrap/48000
+       * cfgloopmanip.c (fix_bb_placements): Return immediately
+       if FROM is BASE_LOOP's header.
+
 2011-04-20  Richard Guenther  <rguenther@suse.de>
 
        Backport from 4.6 branch
index 8f4e7375488c76f33203cbb6d0054a2d9115579d..1dac71529fa4d37afaf253af276a93b3a15b5028 100644 (file)
@@ -185,7 +185,11 @@ fix_bb_placements (basic_block from,
      fix_loop_placement.  */
 
   base_loop = from->loop_father;
-  if (base_loop == current_loops->tree_root)
+  /* If we are already in the outermost loop, the basic blocks cannot be moved
+     outside of it.  If FROM is the header of the base loop, it cannot be moved
+     outside of it, either.  In both cases, we can end now.  */
+  if (base_loop == current_loops->tree_root
+      || from == base_loop->header)
     return;
 
   in_queue = sbitmap_alloc (last_basic_block);