diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-20 09:03:06 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-20 09:03:06 +0000 |
commit | cd9916a9b3bdc2408364926c41fe333b1a51e8a3 (patch) | |
tree | 94bdf259b8ca49c1e5c3f91c1eaf773c30e89dcd /gcc/graph.c | |
parent | 3767bd95180b604104c0e7942950db2c6dc73059 (diff) | |
download | gcc-cd9916a9b3bdc2408364926c41fe333b1a51e8a3.tar.gz |
2013-03-20 Richard Biener <rguenther@suse.de>
* cfgloop.c (verify_loop_structure): Streamline and avoid
ICEing on corrupt loop tree.
* graph.c (draw_cfg_nodes_for_loop): Avoid ICEing on corrupt
loop tree.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196811 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graph.c')
-rw-r--r-- | gcc/graph.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/graph.c b/gcc/graph.c index 51837308bb4..1ecfdf0b761 100644 --- a/gcc/graph.c +++ b/gcc/graph.c @@ -213,7 +213,8 @@ draw_cfg_nodes_for_loop (pretty_printer *pp, int funcdef_no, unsigned int i; const char *fillcolors[3] = { "grey88", "grey77", "grey66" }; - if (loop->latch != EXIT_BLOCK_PTR) + if (loop->header != NULL + && loop->latch != EXIT_BLOCK_PTR) pp_printf (pp, "\tsubgraph cluster_%d_%d {\n" "\tstyle=\"filled\";\n" @@ -229,6 +230,9 @@ draw_cfg_nodes_for_loop (pretty_printer *pp, int funcdef_no, for (struct loop *inner = loop->inner; inner; inner = inner->next) draw_cfg_nodes_for_loop (pp, funcdef_no, inner); + if (loop->header == NULL) + return; + if (loop->latch == EXIT_BLOCK_PTR) body = get_loop_body (loop); else |