diff options
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 94ed459..b4be50c 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 |