diff options
author | Marek Polacek <polacek@redhat.com> | 2013-02-08 11:39:01 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2013-02-08 11:39:01 +0000 |
commit | f64fb0facb4f8f711ceff80c2e81413c6ec267d8 (patch) | |
tree | 10f2eee4f8a4c18113fbb2e3f5153e6f633ffe08 /gcc/cfgloop.c | |
parent | 0375167b6c15a60dc2b974b2654a8ff1dbe7160a (diff) | |
download | gcc-f64fb0facb4f8f711ceff80c2e81413c6ec267d8.zip gcc-f64fb0facb4f8f711ceff80c2e81413c6ec267d8.tar.gz gcc-f64fb0facb4f8f711ceff80c2e81413c6ec267d8.tar.bz2 |
Add more checking of headers.
From-SVN: r195880
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 60fc6e8..3619907 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); |