aboutsummaryrefslogtreecommitdiff
path: root/gcc/dominance.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2004-09-23 15:47:59 +0000
committerFrank Ch. Eigler <fche@gcc.gnu.org>2004-09-23 15:47:59 +0000
commitdf485d8007f540528501f9286531088ae5044420 (patch)
tree8cb2d5d482a0f8a0cfd2788c5789fd9692386513 /gcc/dominance.c
parent7ccf35ed170c496d99d670986e96e7c1d779cee3 (diff)
downloadgcc-df485d8007f540528501f9286531088ae5044420.zip
gcc-df485d8007f540528501f9286531088ae5044420.tar.gz
gcc-df485d8007f540528501f9286531088ae5044420.tar.bz2
re PR tree-optimization/17533 (cc1plus crashes on libmudflap test case, verify_dominators())
2004-09-23 Frank Ch. Eigler <fche@redhat.com> PR tree-optimization/17533 * dominance.c (verify_dominators): Tolerate even more incorrect dominance data during error message printing. * tree-mudflap.c (mf_build_check_statement_for): Build basic blocks and edges more correctly. From-SVN: r87954
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r--gcc/dominance.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/dominance.c b/gcc/dominance.c
index ef40b54..bbb0b21 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -829,16 +829,17 @@ verify_dominators (enum cdi_direction dir)
FOR_EACH_BB (bb)
{
basic_block dom_bb;
+ basic_block imm_bb;
dom_bb = recount_dominator (dir, bb);
- if (dom_bb != get_immediate_dominator (dir, bb))
+ imm_bb = get_immediate_dominator (dir, bb);
+ if (dom_bb != imm_bb)
{
- if (dom_bb == NULL)
- error ("dominator of %d should be (unknown), not %d",
- bb->index, get_immediate_dominator(dir, bb)->index);
+ if ((dom_bb == NULL) || (imm_bb == NULL))
+ error ("dominator of %d status unknown", bb->index);
else
error ("dominator of %d should be %d, not %d",
- bb->index, dom_bb->index, get_immediate_dominator(dir, bb)->index);
+ bb->index, dom_bb->index, imm_bb->index);
err = 1;
}
}