]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-eh.c (lower_try_finally_switch): Really put the location of the last statement...
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 29 Jun 2012 22:39:29 +0000 (22:39 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 29 Jun 2012 22:39:29 +0000 (22:39 +0000)
* tree-eh.c (lower_try_finally_switch): Really put the location of the
last statement of the finally block onto the switch.

From-SVN: r189086

gcc/ChangeLog
gcc/tree-eh.c

index 0fca228f3c24887e49ed2da454a0c703cf383838..45caa67959001449d6fae8d538cb368796e38471 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-eh.c (lower_try_finally_switch): Really put the location of the
+       last statement of the finally block onto the switch.
+
 2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/53539
index 89b95fa78afd97896d93a95372f1ea01c9a7ae3a..3b35ca4286200c7dd506aa1b1cfb3511cb2e8ad2 100644 (file)
@@ -1320,9 +1320,8 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
 
   /* The location of the finally is either the last stmt in the finally
      block or the location of the TRY_FINALLY itself.  */
-  finally_loc = gimple_seq_last_stmt (tf->top_p_seq) != NULL ?
-    gimple_location (gimple_seq_last_stmt (tf->top_p_seq))
-    : tf_loc;
+  x = gimple_seq_last_stmt (finally);
+  finally_loc = x ? gimple_location (x) : tf_loc;
 
   /* Lower the finally block itself.  */
   lower_eh_constructs_1 (state, &finally);