From: Richard Guenther Date: Mon, 13 Aug 2012 13:10:59 +0000 (+0000) Subject: tree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=755a1ca535ebd8f999ef9197254343dde3668e2f;p=gcc.git tree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with multiple latches. 2012-08-13 Richard Guenther * tree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with multiple latches. From-SVN: r190344 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c7fffe1053..57c754b9535 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-13 Richard Guenther + + * tree-cfg.c (print_loop): Avoid ICEing for loops marked for + removal and loops with multiple latches. + 2012-08-13 Jakub Jelinek PR c/53968 diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index a91b4331c93..f8d841a86d2 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -6870,8 +6870,18 @@ print_loop (FILE *file, struct loop *loop, int indent, int verbosity) s_indent[indent] = '\0'; /* Print loop's header. */ - fprintf (file, "%sloop_%d (header = %d, latch = %d", s_indent, - loop->num, loop->header->index, loop->latch->index); + fprintf (file, "%sloop_%d (", s_indent, loop->num); + if (loop->header) + fprintf (file, "header = %d", loop->header->index); + else + { + fprintf (file, "deleted)\n"); + return; + } + if (loop->latch) + fprintf (file, ", latch = %d", loop->latch->index); + else + fprintf (file, ", multiple latches"); fprintf (file, ", niter = "); print_generic_expr (file, loop->nb_iterations, 0);