aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2005-05-06 10:43:58 -0600
committerJeff Law <law@gcc.gnu.org>2005-05-06 10:43:58 -0600
commitb8c1d4a1bce11dd9fad78ef63ec757aebaad3054 (patch)
tree6d6df66aad3d07ccb0ac096747068ca17428c203 /gcc/tree-ssa-threadupdate.c
parent7673b71ce98231709cd068e8ad2c9a3875d34d85 (diff)
downloadgcc-b8c1d4a1bce11dd9fad78ef63ec757aebaad3054.zip
gcc-b8c1d4a1bce11dd9fad78ef63ec757aebaad3054.tar.gz
gcc-b8c1d4a1bce11dd9fad78ef63ec757aebaad3054.tar.bz2
re PR tree-optimization/21380 (ICE compiling with -O)
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. From-SVN: r99324
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 617467a..a5dc049 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;