From 268bab853ddd5736056a371fd33aedd68e81cff9 Mon Sep 17 00:00:00 2001 From: Andrey Belevantsev Date: Fri, 13 Nov 2009 17:32:52 +0300 Subject: [PATCH] re PR rtl-optimization/41697 (ICE on gcc.c-torture/compile/20090917-1.c) 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: r154148 --- gcc/ChangeLog | 6 ++++++ gcc/sel-sched-ir.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 39eb3c6f530..8eb3d840b6d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2009-11-13 Andrey Belevantsev * sched-deps.c (init_deps): New parameter lazy_reg_last. Don't diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 10750746660..bd5560d610c 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -4323,6 +4323,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; }