summaryrefslogtreecommitdiff
path: root/gcc/dominance.c
diff options
context:
space:
mode:
authorfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-23 15:47:59 +0000
committerfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-23 15:47:59 +0000
commit8b218cb774b6bd5362fb10e938289a81027f2c44 (patch)
tree8cb2d5d482a0f8a0cfd2788c5789fd9692386513 /gcc/dominance.c
parentb056d8127419206eaa5c4eb583f3eb70804ea922 (diff)
downloadgcc-8b218cb774b6bd5362fb10e938289a81027f2c44.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87954 138bc75d-0d04-0410-961f-82ee72b054a4
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 ef40b545e8c..bbb0b21484b 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;
}
}