aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfghooks.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-11-20 05:02:28 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-11-20 05:02:28 +0000
commit735538716d00c4a2ba60e3257d7c3092948a5c88 (patch)
treeadcd8f1cb11423dfef36a3d69e2b7f39b0f21c01 /gcc/cfghooks.c
parent2d59754f6a83fcfb57baba3ebeefaab2a96a5e78 (diff)
downloadgcc-735538716d00c4a2ba60e3257d7c3092948a5c88.zip
gcc-735538716d00c4a2ba60e3257d7c3092948a5c88.tar.gz
gcc-735538716d00c4a2ba60e3257d7c3092948a5c88.tar.bz2
basic-block.h (edge_def): Add dest_idx.
* basic-block.h (edge_def): Add dest_idx. * cfg.c (unchecked_make_edge): Initialize dest_idx. (remove_edge): Simplify the disconnection of an edge from its destination. (redirect_edge_succ): Likewise. * cfghooks.c (verify_flow_info): Check the consistency of dest_idx for each edge. From-SVN: r90958
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r--gcc/cfghooks.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index 00f4562..42d1183 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -178,6 +178,20 @@ verify_flow_info (void)
fputc ('\n', stderr);
err = 1;
}
+
+ if (ei.index != e->dest_idx)
+ {
+ error ("basic block %d pred edge is corrupted", bb->index);
+ error ("its dest_idx should be %d, not %d",
+ ei.index, e->dest_idx);
+ fputs ("Predecessor: ", stderr);
+ dump_edge_info (stderr, e, 0);
+ fputs ("\nSuccessor: ", stderr);
+ dump_edge_info (stderr, e, 1);
+ fputc ('\n', stderr);
+ err = 1;
+ }
+
edge_checksum[e->dest->index + 2] -= (size_t) e;
}
}