aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-13 13:10:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-08-13 13:10:59 +0000
commit755a1ca535ebd8f999ef9197254343dde3668e2f (patch)
tree49fca4195373e837840ac5a8ca0e9c1ebda1bc45 /gcc
parenteb87c7c4890b87d5f228b9261c2e3b3a5b81acd7 (diff)
downloadgcc-755a1ca535ebd8f999ef9197254343dde3668e2f.zip
gcc-755a1ca535ebd8f999ef9197254343dde3668e2f.tar.gz
gcc-755a1ca535ebd8f999ef9197254343dde3668e2f.tar.bz2
tree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with multiple latches.
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. From-SVN: r190344
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-cfg.c14
2 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c7fffe..57c754b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2012-08-13 Jakub Jelinek <jakub@redhat.com>
PR c/53968
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index a91b433..f8d841a 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);