This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix loop dumping ICEs
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Aug 2012 15:00:39 +0200 (CEST)
- Subject: [PATCH] Fix loop dumping ICEs
Bootstrapped on x86_64-unknown-linux-gnu, committed.
Richard.
2012-08-13 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (print_loop): Avoid ICEing for loops marked for
removal and loops with multiple latches.
Index: gcc/tree-cfg.c
===================================================================
*** gcc/tree-cfg.c (revision 190339)
--- gcc/tree-cfg.c (working copy)
*************** print_loop (FILE *file, struct loop *loo
*** 6870,6877 ****
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, ", niter = ");
print_generic_expr (file, loop->nb_iterations, 0);
--- 6969,6986 ----
s_indent[indent] = '\0';
/* Print loop's header. */
! 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);