This fixes the libgo breakage.  Seems I really should have removed the
edge after we split the block with null dereference after __builtin_trap 
statement so that it's unreachable.

Bootstrapped/regtested on x86_64-linux + ppc64-linux + bootstrapped on
aarch64-linux, ok for trunk?

2015-08-21  Marek Polacek  <pola...@redhat.com>

        PR tree-optimization/67284
        * gimple-ssa-isolate-paths.c (insert_trap): Remove the edge after
        we split a block.

diff --git gcc/gimple-ssa-isolate-paths.c gcc/gimple-ssa-isolate-paths.c
index ca2322d..5ac61d3 100644
--- gcc/gimple-ssa-isolate-paths.c
+++ gcc/gimple-ssa-isolate-paths.c
@@ -115,7 +115,8 @@ insert_trap (gimple_stmt_iterator *si_p, tree op)
   else
     gsi_insert_before (si_p, seq, GSI_NEW_STMT);
 
-  split_block (gimple_bb (new_stmt), new_stmt);
+  edge e = split_block (gimple_bb (new_stmt), new_stmt);
+  remove_edge (e);
   *si_p = gsi_for_stmt (stmt);
 }
 

        Marek

Reply via email to