diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-26 15:09:43 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-26 15:09:43 +0000 |
commit | 0b76e49c0c8056edd706ed1dce9bd47276353182 (patch) | |
tree | 52ce17343c80841e1ac188ff00e373b1084c24a7 /gcc/tree-eh.c | |
parent | 2a62ce00f61d26370c9b174c98dbd2f5136082bd (diff) | |
download | gcc-0b76e49c0c8056edd706ed1dce9bd47276353182.tar.gz |
2010-01-26 Richard Guenther <rguenther@suse.de>
PR middle-end/42806
* tree-eh.c (unsplit_eh): Skip debug insns.
* g++.dg/other/pr42806.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156249 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 1a9e7b50e6a..2cb334ff0d4 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3350,8 +3350,11 @@ unsplit_eh (eh_landing_pad lp) if ((e_in->flags & EDGE_EH) == 0 || (e_out->flags & EDGE_EH) != 0) return false; - /* The block must be empty except for the labels. */ - if (!gsi_end_p (gsi_after_labels (bb))) + /* The block must be empty except for the labels and debug insns. */ + gsi = gsi_after_labels (bb); + if (!gsi_end_p (gsi) && is_gimple_debug (gsi_stmt (gsi))) + gsi_next_nondebug (&gsi); + if (!gsi_end_p (gsi)) return false; /* The destination block must not already have a landing pad |