Add more checking of headers.

From-SVN: r195880
This commit is contained in:
Marek Polacek 2013-02-08 11:39:01 +00:00 committed by Marek Polacek
parent 0375167b6c
commit f64fb0facb
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-02-08 Marek Polacek <polacek@redhat.com>
* cfgloop.c (verify_loop_structure): Add more checking
of headers.
2013-02-08 Richard Biener <rguenther@suse.de> 2013-02-08 Richard Biener <rguenther@suse.de>
PR middle-end/56181 PR middle-end/56181

View File

@ -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. */ /* Check get_loop_body. */
visited = sbitmap_alloc (last_basic_block); visited = sbitmap_alloc (last_basic_block);
bitmap_clear (visited); bitmap_clear (visited);