summaryrefslogtreecommitdiff
path: root/gcc/dominance.c
diff options
context:
space:
mode:
authorfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-22 20:36:14 +0000
committerfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-22 20:36:14 +0000
commitf468be34b43786a757a41e1df6166e3dc42f803d (patch)
treee95a45901f4e85265f5f0469d53912130f7d5c02 /gcc/dominance.c
parent3f8eac3cd918da270d591262973877392c3dfeca (diff)
downloadgcc-f468be34b43786a757a41e1df6166e3dc42f803d.tar.gz
2004-09-22 Frank Ch. Eigler <fche@redhat.com>
* dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87883 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r--gcc/dominance.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/dominance.c b/gcc/dominance.c
index 278254719af..ef40b545e8c 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -833,8 +833,12 @@ verify_dominators (enum cdi_direction dir)
dom_bb = recount_dominator (dir, bb);
if (dom_bb != get_immediate_dominator (dir, bb))
{
- error ("dominator of %d should be %d, not %d",
- bb->index, dom_bb->index, get_immediate_dominator(dir, bb)->index);
+ if (dom_bb == NULL)
+ error ("dominator of %d should be (unknown), not %d",
+ bb->index, get_immediate_dominator(dir, bb)->index);
+ else
+ error ("dominator of %d should be %d, not %d",
+ bb->index, dom_bb->index, get_immediate_dominator(dir, bb)->index);
err = 1;
}
}