]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/54649 (Go bootstrap failed)
authorDehao Chen <dehao@google.com>
Fri, 21 Sep 2012 15:35:46 +0000 (15:35 +0000)
committerDehao Chen <dehao@gcc.gnu.org>
Fri, 21 Sep 2012 15:35:46 +0000 (15:35 +0000)
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.

From-SVN: r191614

gcc/ChangeLog
gcc/tree-eh.c

index 648eb10b101b74ceb3cc008d5d02192426afdcc5..23aece2b1a6c0748514294e7bb3224933a1d7e0f 100644 (file)
@@ -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
index cd48f64582f05da5b9bd61f0f2543ccbd8eb3105..b0c006b07ae294fc3d6a2f0453f76b34d84bde79 100644 (file)
@@ -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;