aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2017-01-05 01:46:14 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2017-01-05 01:46:14 +0000
commit556655048b30188a560f135ccde732bc436eded2 (patch)
tree97d67deb2126d6cba12c2c7c06b78b0d37401d62 /gcc/tree-eh.c
parent692216906ba1c7734183c4940122d5684c05141f (diff)
downloadgcc-556655048b30188a560f135ccde732bc436eded2.zip
gcc-556655048b30188a560f135ccde732bc436eded2.tar.gz
gcc-556655048b30188a560f135ccde732bc436eded2.tar.bz2
[-fcompare-debug] skip more debug stmts in cleanup_empty_eh
Various Ada RTS files failed -fcompare-debug compilation because debug stmts prevented EH cleanups from taking place. Adjusting cleanup_empty_eh to skip them fixes it. for gcc/ChangeLog * gimple-iterator.h (gsi_one_nondebug_before_end_p): New. * tree-eh.c (cleanup_empty_eh): Skip more debug stmts. From-SVN: r244088
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;