diff options
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 2174276..8a99ad3 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3743,7 +3743,13 @@ cleanup_empty_eh (eh_landing_pad lp) /* If the block is totally empty, look for more unsplitting cases. */ if (gsi_end_p (gsi)) - return cleanup_empty_eh_unsplit (bb, e_out, lp); + { + /* For the degenerate case of an infinite loop bail out. */ + if (e_out->dest == bb) + return false; + + return cleanup_empty_eh_unsplit (bb, e_out, lp); + } /* The block should consist only of a single RESX statement. */ resx = gsi_stmt (gsi); |