OSDN Git Service

* tree-eh.c (lower_try_finally_switch): Really put the location of the
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Jun 2012 22:39:45 +0000 (22:39 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Jun 2012 22:39:45 +0000 (22:39 +0000)
last statement of the finally block onto the switch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189087 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-eh.c

index 6ae983c..f111f5a 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  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
 
        * configure: Regenerate.
index 521e2f7..2da170d 100644 (file)
@@ -1325,9 +1325,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);