diff options
author | Marek Polacek <polacek@redhat.com> | 2013-02-08 11:39:01 +0000 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2013-02-08 11:39:01 +0000 |
commit | 73e400fb9b6d94503cca8e83899d315d2f059c7c (patch) | |
tree | 10f2eee4f8a4c18113fbb2e3f5153e6f633ffe08 /gcc/cfgloop.c | |
parent | f81fff2564f64d757bd767a4cb22071e62cb6269 (diff) |
Add more checking of headers.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@195880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 9 |
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); |