diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-06 16:43:58 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-06 16:43:58 +0000 |
commit | 232ccb3086420ea3c20da2af1ada8fd4f478bfb6 (patch) | |
tree | 6d6df66aad3d07ccb0ac096747068ca17428c203 /gcc/tree-ssa-threadupdate.c | |
parent | 9b20d84fec009d6a9c9b3b9d03cfa6bd697445d4 (diff) | |
download | gcc-232ccb3086420ea3c20da2af1ada8fd4f478bfb6.tar.gz |
PR tree-optimization/21380
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
thread through a block with no preds.
* gcc.c-torture/compile/pr21380.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 617467a4ef0..a5dc0496092 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -811,7 +811,8 @@ thread_through_all_blocks (void) FOR_EACH_BB (bb) { - if (bb_ann (bb)->incoming_edge_threaded) + if (bb_ann (bb)->incoming_edge_threaded + && EDGE_COUNT (bb->preds) > 0) { retval |= thread_block (bb); bb_ann (bb)->incoming_edge_threaded = false; |