summaryrefslogtreecommitdiff
path: root/gcc/dominance.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2004-09-22 20:36:14 +0000
committerFrank Ch. Eigler <fche@gcc.gnu.org>2004-09-22 20:36:14 +0000
commit08fb229ea8fa630c482553f284eeeed6c6a44c25 (patch)
treee95a45901f4e85265f5f0469d53912130f7d5c02 /gcc/dominance.c
parentecd16bf6652c30c8eacbb2dabbc4e6dfd12236c7 (diff)
downloadgcc-08fb229ea8fa630c482553f284eeeed6c6a44c25.tar.gz
dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL.
2004-09-22 Frank Ch. Eigler <fche@redhat.com> * dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL. From-SVN: r87883
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;
}
}