aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2005-04-25 19:24:28 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2005-04-25 17:24:28 +0000
commitcc7220fd0e78ebe5c963157b1272729540b62c9a (patch)
tree3e4dfc8934383c983170f17940177f54350abc6f /gcc/tree-cfg.c
parent2845f02a6f36e198848fc90a266dd75c9842bcc0 (diff)
downloadgcc-cc7220fd0e78ebe5c963157b1272729540b62c9a.zip
gcc-cc7220fd0e78ebe5c963157b1272729540b62c9a.tar.gz
gcc-cc7220fd0e78ebe5c963157b1272729540b62c9a.tar.bz2
tree-cfg.c (tree_duplicate_bb): Duplicate EH region too.
* tree-cfg.c (tree_duplicate_bb): Duplicate EH region too. * except.c: Include diagnostic.h (dump_eh_tree, verify_eh_tree): New functions. * except.h (verify_eh_tree, dump_eh_tree, verify_eh_edges): Declare. * tree-cfg.c (tree_verify_flow_info): verify eh edges. (dump_function_to_file): dump eh tree. * tree-eh.c (mark_eh_edge): New function. (mark_eh_edge_found_error): New static variable. (verify_eh_edges): New function. From-SVN: r98724
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index d3c71ab..a9098cd 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -554,6 +554,8 @@ make_exit_edges (basic_block bb)
gcc_assert (last);
switch (TREE_CODE (last))
{
+ case RESX_EXPR:
+ break;
case CALL_EXPR:
/* If this function receives a nonlocal goto, then we need to
make edges from this call site to all the nonlocal goto
@@ -3761,6 +3763,8 @@ tree_verify_flow_info (void)
stmt = bsi_stmt (bsi);
+ err |= verify_eh_edges (stmt);
+
if (is_ctrl_stmt (stmt))
{
FOR_EACH_EDGE (e, ei, bb->succs)
@@ -4729,6 +4733,7 @@ tree_duplicate_bb (basic_block bb)
def_operand_p def_p;
ssa_op_iter op_iter;
tree stmt, copy;
+ int region;
stmt = bsi_stmt (bsi);
if (TREE_CODE (stmt) == LABEL_EXPR)
@@ -4739,6 +4744,9 @@ tree_duplicate_bb (basic_block bb)
copy = unshare_expr (stmt);
bsi_insert_after (&bsi_tgt, copy, BSI_NEW_STMT);
copy_virtual_operands (copy, stmt);
+ region = lookup_stmt_eh_region (stmt);
+ if (region >= 0)
+ add_stmt_to_eh_region (copy, region);
/* Create new names for all the definitions created by COPY and
add replacement mappings for each new name. */
@@ -4947,6 +4955,8 @@ dump_function_to_file (tree fn, FILE *file, int flags)
}
fprintf (file, ")\n");
+ if (flags & TDF_DETAILS)
+ dump_eh_tree (file, DECL_STRUCT_FUNCTION (fn));
if (flags & TDF_RAW)
{
dump_node (fn, TDF_SLIM | flags, file);