From ae117ec5ef443d679c705b2b752a936ce653bb60 Mon Sep 17 00:00:00 2001 From: dehao Date: Wed, 10 Oct 2012 01:26:30 +0000 Subject: gcc: 2012-10-10 Dehao Chen * 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 * cp-gimplify.c (cp_genericize_r): Set location for TRY expr. testsuite: 2012-10-10 Dehao Chen * 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 --- gcc/tree-eh.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/tree-eh.c') 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 -- cgit v1.2.1