From: Andrey Belevantsev Date: Tue, 24 Aug 2010 08:54:02 +0000 (+0400) Subject: backport: re PR rtl-optimization/41697 (ICE on gcc.c-torture/compile/20090917-1.c) X-Git-Tag: releases/gcc-4.4.5~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6befa42b920cbdd3214cb7426229ba97bcee6030;p=thirdparty%2Fgcc.git backport: re PR rtl-optimization/41697 (ICE on gcc.c-torture/compile/20090917-1.c) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dda1ab1bbda5..c3909fa8af1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2010-08-24 Andrey Belevantsev + + Backport from mainline: + 2009-11-13 Andrey Belevantsev + + 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 Backport from mainline: diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 92bc3ccb2ee6..d47368fdfb21 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -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; }