From: Frank Ch. Eigler Date: Wed, 22 Sep 2004 20:36:14 +0000 (+0000) Subject: dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08fb229ea8fa630c482553f284eeeed6c6a44c25;p=gcc.git dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL. 2004-09-22 Frank Ch. Eigler * dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL. From-SVN: r87883 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 203a65bb44f..0d59f07fa33 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-09-22 Frank Ch. Eigler + + * dominance.c (verify_dominators): Don't SEGV if recount_dominator + returns NULL. + 2004-09-22 Kazu Hirata * doc/c-tree.texi (TRUTH_NOT_EXPR, TRUTH_ANDIF_EXPR, 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; } }