]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR rtl-optimization/41697 (ICE on gcc.c-torture/compile/20090917-1.c)
authorAndrey Belevantsev <abel@ispras.ru>
Tue, 24 Aug 2010 08:54:02 +0000 (12:54 +0400)
committerAndrey Belevantsev <abel@gcc.gnu.org>
Tue, 24 Aug 2010 08:54:02 +0000 (12:54 +0400)
Backport from mainline:
 PR rtl-optimization/41697
         * sel-sched-ir.c (fallthru_bb_of_jump): Bail out when a block with
         a conditional jump has a single successor.

From-SVN: r163502

gcc/ChangeLog
gcc/sel-sched-ir.c

index dda1ab1bbda50e488984d4d6d98ddfdc96cdfc19..c3909fa8af1a939814bcf55863f00dfb6967dcd4 100644 (file)
@@ -1,3 +1,12 @@
+2010-08-24  Andrey Belevantsev  <abel@ispras.ru>
+
+       Backport from mainline:
+       2009-11-13  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/41697
+       * sel-sched-ir.c (fallthru_bb_of_jump): Bail out when a block with
+       a conditional jump has a single successor.
+
 2010-08-24  Andrey Belevantsev  <abel@ispras.ru>
 
        Backport from mainline:
index 92bc3ccb2ee6fd6971b27be58bce4cf6196ddba9..d47368fdfb213c46f8244c2a0a4c181fceaf2436 100644 (file)
@@ -4290,6 +4290,11 @@ fallthru_bb_of_jump (rtx jump)
   if (!any_condjump_p (jump))
     return NULL;
 
+  /* A basic block that ends with a conditional jump may still have one successor
+     (and be followed by a barrier), we are not interested.  */
+  if (single_succ_p (BLOCK_FOR_INSN (jump)))
+    return NULL;
+
   return FALLTHRU_EDGE (BLOCK_FOR_INSN (jump))->dest;
 }