aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 2be4312..45e6b9e4 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -4382,7 +4382,8 @@ cleanup_empty_eh (eh_landing_pad lp)
return false;
}
- resx = last_stmt (bb);
+ gsi = gsi_last_nondebug_bb (bb);
+ resx = gsi_stmt (gsi);
if (resx && is_gimple_resx (resx))
{
if (stmt_can_throw_external (resx))
@@ -4416,12 +4417,12 @@ cleanup_empty_eh (eh_landing_pad lp)
resx = gsi_stmt (gsi);
if (!e_out && gimple_call_builtin_p (resx, BUILT_IN_STACK_RESTORE))
{
- gsi_next (&gsi);
+ gsi_next_nondebug (&gsi);
resx = gsi_stmt (gsi);
}
if (!is_gimple_resx (resx))
return ret;
- gcc_assert (gsi_one_before_end_p (gsi));
+ gcc_assert (gsi_one_nondebug_before_end_p (gsi));
/* Determine if there are non-EH edges, or resx edges into the handler. */
has_non_eh_pred = false;