summaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authordehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-10 01:26:30 +0000
committerdehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-10 01:26:30 +0000
commitae117ec5ef443d679c705b2b752a936ce653bb60 (patch)
treeb6320b917e9625d49064449b5ac44f56d88add5f /gcc/tree-eh.c
parent698152b443af17d49607eb983e6759e3d1e8355b (diff)
downloadgcc-ae117ec5ef443d679c705b2b752a936ce653bb60.tar.gz
gcc:
2012-10-10 Dehao Chen <dehao@google.com> * tree-eh.c (lower_try_finally_onedest): Set correct location for deallocator. * gimplify.c (gimplify_expr): Set correct location for TRY stmt. gcc/cp: 2012-10-10 Dehao Chen <dehao@google.com> * cp-gimplify.c (cp_genericize_r): Set location for TRY expr. testsuite: 2012-10-10 Dehao Chen <dehao@google.com> * g++.dg/debug/dwarf2/deallocator.C: Cover more deallocator cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192285 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 94ed459f6f1..b4be50c6fd3 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1100,6 +1100,7 @@ lower_try_finally_onedest (struct leh_state *state, struct leh_tf_state *tf)
struct goto_queue_node *q, *qe;
gimple x;
gimple_seq finally;
+ gimple_stmt_iterator gsi;
tree finally_label;
location_t loc = gimple_location (tf->try_finally_expr);
@@ -1120,6 +1121,17 @@ lower_try_finally_onedest (struct leh_state *state, struct leh_tf_state *tf)
lower_eh_constructs_1 (state, &finally);
+ for (gsi = gsi_start (finally); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ gimple stmt = gsi_stmt (gsi);
+ if (LOCATION_LOCUS (gimple_location (stmt)) == UNKNOWN_LOCATION)
+ {
+ tree block = gimple_block (stmt);
+ gimple_set_location (stmt, gimple_location (tf->try_finally_expr));
+ gimple_set_block (stmt, block);
+ }
+ }
+
if (tf->may_throw)
{
/* Only reachable via the exception edge. Add the given label to