diff options
| author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-17 13:14:38 +0000 |
|---|---|---|
| committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-17 13:14:38 +0000 |
| commit | 8e659d3072a90ecfd60e39b8e766f60282da3a70 (patch) | |
| tree | 5acb9fdfd81d8a472fa93bbc16a1bc890b6adc3f | |
| parent | 5bfb60b4afb3901e09b9303def258f7ee72ad5ac (diff) | |
| download | ppe42-gcc-8e659d3072a90ecfd60e39b8e766f60282da3a70.tar.gz ppe42-gcc-8e659d3072a90ecfd60e39b8e766f60282da3a70.zip | |
2006-07-13 Andrew Haley <aph@redhat.com>
PR tree-optimization/19505
* tree-cfgcleanup.c (tree_forwarder_block_p): If we have an EH
edge leaving this block, make sure that the destination of this
block has only one predecessor.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115518 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/tree-cfgcleanup.c | 19 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c6048b7e09..0ff6fa37143 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-07-13 Andrew Haley <aph@redhat.com> + + PR tree-optimization/19505 + * tree-cfgcleanup.c (tree_forwarder_block_p): If we have an EH + edge leaving this block, make sure that the destination of this + block has only one predecessor. + 2006-07-17 Richard Guenther <rguenther@suse.de> PR tree-optimization/28238 diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index ab452c4af5a..be90209d3be 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -239,6 +239,9 @@ static bool tree_forwarder_block_p (basic_block bb, bool phi_wanted) { block_stmt_iterator bsi; + edge_iterator ei; + edge e, succ; + basic_block dest; /* BB must have a single outgoing edge. */ if (single_succ_p (bb) != 1 @@ -290,6 +293,22 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted) return false; } + /* If we have an EH edge leaving this block, make sure that the + destination of this block has only one predecessor. This ensures + that we don't get into the situation where we try to remove two + forwarders that go to the same basic block but are handlers for + different EH regions. */ + succ = single_succ_edge (bb); + dest = succ->dest; + FOR_EACH_EDGE (e, ei, bb->preds) + { + if (e->flags & EDGE_EH) + { + if (!single_pred_p (dest)) + return false; + } + } + return true; } |

