[Bug rtl-optimization/46875] [4.6 Regression] ICE: verify_flow_info failed: too many outgoing branch edges from bb 3 with -Os -fselective-scheduling2

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 13 13:22:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46875

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |amonakov at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-13 13:21:35 UTC ---
We try to remove a tablejump, but then the edge is not marked fallthrough
because of the jump table that is left between basic blocks.  We probably just
shouldn't even try to delete table jumps.  I'll submit the following patch.

diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c
index 83c423a..acae025 100644
--- a/gcc/sched-vis.c
+++ b/gcc/sched-vis.c
@@ -604,7 +604,6 @@ print_pattern (char *buf, const_rtx x, int verbose)
       sprintf (buf, "asm {%s}", XSTR (x, 0));
       break;
     case ADDR_VEC:
-      break;
     case ADDR_DIFF_VEC:
       print_value (buf, XEXP (x, 0), verbose);
       break;
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 2696882..427fd22 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -6109,7 +6109,8 @@ sel_is_loop_preheader_p (basic_block bb)
 static bool
 bb_has_removable_jump_to_p (basic_block jump_bb, basic_block dest_bb)
 {
-  if (!onlyjump_p (BB_END (jump_bb)))
+  if (!onlyjump_p (BB_END (jump_bb))
+      || tablejump_p (BB_END (jump_bb), NULL, NULL))
     return false;

   /* Several outgoing edges, abnormal edge or destination of jump is



More information about the Gcc-bugs mailing list