tree-eh.c (lower_try_finally_switch): Set the location of the finally on the entire...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 30 Aug 2017 19:10:38 +0000 (19:10 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 30 Aug 2017 19:10:38 +0000 (19:10 +0000)
* tree-eh.c (lower_try_finally_switch): Set the location of the finally
on the entire header of the finally block in the fallthru case.

From-SVN: r251546

gcc/ChangeLog
gcc/tree-eh.c

index c797558849c2a0c30f9316c7bfc012266eccb0f9..9106eb735dc4425ae367ef8f368b94db125688f7 100644 (file)
@@ -1,3 +1,8 @@
+2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-eh.c (lower_try_finally_switch): Set the location of the finally
+       on the entire header of the finally block in the fallthru case.
+
 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
 
        * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
index 938197992ceb386592496cf63dcd55db1efa59bd..329fadb230f35cc8a22d625a505c09d36e28d496 100644 (file)
@@ -1416,11 +1416,12 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
       x = gimple_build_assign (finally_tmp,
                               build_int_cst (integer_type_node,
                                              fallthru_index));
+      gimple_set_location (x, finally_loc);
       gimple_seq_add_stmt (&tf->top_p_seq, x);
 
       tmp = build_int_cst (integer_type_node, fallthru_index);
       last_case = build_case_label (tmp, NULL,
-                                   create_artificial_label (tf_loc));
+                                   create_artificial_label (finally_loc));
       case_label_vec.quick_push (last_case);
       last_case_index++;
 
@@ -1429,7 +1430,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
 
       tmp = lower_try_finally_fallthru_label (tf);
       x = gimple_build_goto (tmp);
-      gimple_set_location (x, tf_loc);
+      gimple_set_location (x, finally_loc);
       gimple_seq_add_stmt (&switch_body, x);
     }