summaryrefslogtreecommitdiff
path: root/gcc/cfgloop.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-08 11:39:01 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-08 11:39:01 +0000
commit14a0d8d7a705d16c9ce43828ec3ac27f18bcc945 (patch)
tree10f2eee4f8a4c18113fbb2e3f5153e6f633ffe08 /gcc/cfgloop.c
parentff829efafe8edc3daafc4e07c1fb5d68555772a0 (diff)
downloadgcc-14a0d8d7a705d16c9ce43828ec3ac27f18bcc945.tar.gz
Add more checking of headers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r--gcc/cfgloop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index 60fc6e8c31f..3619907f727 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -1353,6 +1353,15 @@ verify_loop_structure (void)
}
}
+ /* Check the headers. */
+ FOR_EACH_BB (bb)
+ if (bb_loop_header_p (bb)
+ && bb->loop_father->header != bb)
+ {
+ error ("loop with header %d not in loop tree", bb->index);
+ err = 1;
+ }
+
/* Check get_loop_body. */
visited = sbitmap_alloc (last_basic_block);
bitmap_clear (visited);