aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2012-11-01 00:08:51 +0000
committerDehao Chen <dehao@gcc.gnu.org>2012-11-01 00:08:51 +0000
commit29f5bccbfc09753b7e465285956bb15fe3bc10b0 (patch)
tree06a68854befb9c71d71c7a7a73535a6958147b76 /gcc/tree-eh.c
parent0f379f762d2f3e7f84c038368b9e32c50c8deaab (diff)
downloadgcc-29f5bccbfc09753b7e465285956bb15fe3bc10b0.zip
gcc-29f5bccbfc09753b7e465285956bb15fe3bc10b0.tar.gz
gcc-29f5bccbfc09753b7e465285956bb15fe3bc10b0.tar.bz2
tree-eh.c (do_return_redirection): Set location for jump statement.
gcc: 2012-10-31 Dehao Chen <dehao@google.com> * tree-eh.c (do_return_redirection): Set location for jump statement. (do_goto_redirection): Likewise. (frob_into_branch_around): Likewise. (lower_try_finally_nofallthru): Likewise. (lower_try_finally_copy): Likewise. (lower_try_finally_switch): Likewise. * expr.c (store_expr): Use current insn location instead of expr location. (expand_expr_real): Likewise. (expand_expr_real_1): Likewise. gcc/testsuite: 2012-10-31 Dehao Chen <dehao@google.com> * g++.dg/debug/dwarf2/block.C: New testcase. From-SVN: r193053
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 9042f06..960a966 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -739,6 +739,7 @@ do_return_redirection (struct goto_queue_node *q, tree finlab, gimple_seq mod)
gimple_seq_add_seq (&q->repl_stmt, mod);
x = gimple_build_goto (finlab);
+ gimple_set_location (x, q->location);
gimple_seq_add_stmt (&q->repl_stmt, x);
}
@@ -758,6 +759,7 @@ do_goto_redirection (struct goto_queue_node *q, tree finlab, gimple_seq mod,
gimple_seq_add_seq (&q->repl_stmt, mod);
x = gimple_build_goto (finlab);
+ gimple_set_location (x, q->location);
gimple_seq_add_stmt (&q->repl_stmt, x);
}
@@ -857,6 +859,7 @@ frob_into_branch_around (gimple tp, eh_region region, tree over)
if (!over)
over = create_artificial_label (loc);
x = gimple_build_goto (over);
+ gimple_set_location (x, loc);
gimple_seq_add_stmt (&cleanup, x);
}
gimple_seq_add_seq (&eh_seq, cleanup);
@@ -1085,6 +1088,7 @@ lower_try_finally_nofallthru (struct leh_state *state,
emit_post_landing_pad (&eh_seq, tf->region);
x = gimple_build_goto (lab);
+ gimple_set_location (x, gimple_location (tf->try_finally_expr));
gimple_seq_add_stmt (&eh_seq, x);
}
}
@@ -1223,6 +1227,7 @@ lower_try_finally_copy (struct leh_state *state, struct leh_tf_state *tf)
tmp = lower_try_finally_fallthru_label (tf);
x = gimple_build_goto (tmp);
+ gimple_set_location (x, tf_loc);
gimple_seq_add_stmt (&new_stmt, x);
}
@@ -1395,6 +1400,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
tmp = lower_try_finally_fallthru_label (tf);
x = gimple_build_goto (tmp);
+ gimple_set_location (x, tf_loc);
gimple_seq_add_stmt (&switch_body, x);
}
@@ -1423,6 +1429,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
gimple_seq_add_stmt (&eh_seq, x);
x = gimple_build_goto (finally_label);
+ gimple_set_location (x, tf_loc);
gimple_seq_add_stmt (&eh_seq, x);
tmp = build_int_cst (integer_type_node, eh_index);