Fix print_loop_info ICE

Message ID 20230814083705.AA2713858C31@sourceware.org
State Unresolved
Headers
Series Fix print_loop_info ICE |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Richard Biener Aug. 14, 2023, 8:35 a.m. UTC
  It ICEs when invoked via debug_loops and dump_file clear.

Pushed as obvious.

	* tree-cfg.cc (print_loop_info): Dump to 'file', not 'dump_file'.
---
 gcc/tree-cfg.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index ab1f8067c54..fae80bb5b91 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -8565,7 +8565,7 @@  print_loop_info (FILE *file, const class loop *loop, const char *prefix)
       fprintf (file, "\n%siterations by profile: %f (%s%s) entry count:", prefix,
 	       iterations.to_double (), reliable ? "reliable" : "unreliable",
 	       maybe_flat_loop_profile (loop) ? ", maybe flat" : "");
-      loop_count_in (loop).dump (dump_file, cfun);
+      loop_count_in (loop).dump (file, cfun);
     }
 
 }