This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix libgo breakage (PR tree-optimization/67284)
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Date: Fri, 21 Aug 2015 12:52:33 +0200
- Subject: [PATCH] Fix libgo breakage (PR tree-optimization/67284)
- Authentication-results: sourceware.org; auth=none
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 <polacek@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