diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-eh.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 648eb10..23aece2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-09-21 Dehao Chen <dehao@google.com> + + PR go/54649 + * tree-eh.c (lower_try_finally_dup_block): Set the correct block for + stmts in the duplicated EH block. + 2012-09-21 Richard Guenther <rguenther@suse.de> PR tree-optimization/54647 diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index cd48f64..b0c006b 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -883,8 +883,15 @@ lower_try_finally_dup_block (gimple_seq seq, struct leh_state *outer_state, new_seq = copy_gimple_seq_and_replace_locals (seq); for (gsi = gsi_start (new_seq); !gsi_end_p (gsi); gsi_next (&gsi)) - if (IS_UNKNOWN_LOCATION (gimple_location (gsi_stmt (gsi)))) - gimple_set_location (gsi_stmt (gsi), loc); + { + gimple stmt = gsi_stmt (gsi); + if (IS_UNKNOWN_LOCATION (gimple_location (stmt))) + { + tree block = gimple_block (stmt); + gimple_set_location (stmt, loc); + gimple_set_block (stmt, block); + } + } if (outer_state->tf) region = outer_state->tf->try_finally_expr; |