From a4235fd2145f23e00c6b7de9a6095027600b3995 Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 6 Feb 2006 23:12:46 +0000
Subject: [PATCH] 	* reorg.c (dbr_schedule): Use dump_file instead of
 file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110671 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                     |  4 ++++
 gcc/reorg.c                       | 32 +++++++++++++++----------------
 gcc/testsuite/gcc.dg/20051206-1.c |  0
 3 files changed, 20 insertions(+), 16 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/20051206-1.c

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ba34e22d5a1b..f9848cd7bd62 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-06  Richard Sandiford  <richard@codesourcery.com>
+
+	* reorg.c (dbr_schedule): Use dump_file instead of file.
+
 2006-02-06  Steve Ellcey  <sje@cup.hp.com>
 
 	PR target/25917
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 0029b7caaea5..3376c00a63f1 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3638,7 +3638,7 @@ dbr_schedule (rtx first)
   /* It is not clear why the line below is needed, but it does seem to be.  */
   unfilled_firstobj = obstack_alloc (&unfilled_slots_obstack, 0);
 
-  if (file)
+  if (dump_file)
     {
       int i, j, need_comma;
       int total_delay_slots[MAX_DELAY_HISTOGRAM + 1];
@@ -3648,25 +3648,25 @@ dbr_schedule (rtx first)
 	   reorg_pass_number < MAX_REORG_PASSES;
 	   reorg_pass_number++)
 	{
-	  fprintf (file, ";; Reorg pass #%d:\n", reorg_pass_number + 1);
+	  fprintf (dump_file, ";; Reorg pass #%d:\n", reorg_pass_number + 1);
 	  for (i = 0; i < NUM_REORG_FUNCTIONS; i++)
 	    {
 	      need_comma = 0;
-	      fprintf (file, ";; Reorg function #%d\n", i);
+	      fprintf (dump_file, ";; Reorg function #%d\n", i);
 
-	      fprintf (file, ";; %d insns needing delay slots\n;; ",
+	      fprintf (dump_file, ";; %d insns needing delay slots\n;; ",
 		       num_insns_needing_delays[i][reorg_pass_number]);
 
 	      for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
 		if (num_filled_delays[i][j][reorg_pass_number])
 		  {
 		    if (need_comma)
-		      fprintf (file, ", ");
+		      fprintf (dump_file, ", ");
 		    need_comma = 1;
-		    fprintf (file, "%d got %d delays",
+		    fprintf (dump_file, "%d got %d delays",
 			     num_filled_delays[i][j][reorg_pass_number], j);
 		  }
-	      fprintf (file, "\n");
+	      fprintf (dump_file, "\n");
 	    }
 	}
       memset (total_delay_slots, 0, sizeof total_delay_slots);
@@ -3692,35 +3692,35 @@ dbr_schedule (rtx first)
 		total_delay_slots[0]++;
 	    }
 	}
-      fprintf (file, ";; Reorg totals: ");
+      fprintf (dump_file, ";; Reorg totals: ");
       need_comma = 0;
       for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
 	{
 	  if (total_delay_slots[j])
 	    {
 	      if (need_comma)
-		fprintf (file, ", ");
+		fprintf (dump_file, ", ");
 	      need_comma = 1;
-	      fprintf (file, "%d got %d delays", total_delay_slots[j], j);
+	      fprintf (dump_file, "%d got %d delays", total_delay_slots[j], j);
 	    }
 	}
-      fprintf (file, "\n");
+      fprintf (dump_file, "\n");
 #if defined (ANNUL_IFTRUE_SLOTS) || defined (ANNUL_IFFALSE_SLOTS)
-      fprintf (file, ";; Reorg annuls: ");
+      fprintf (dump_file, ";; Reorg annuls: ");
       need_comma = 0;
       for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
 	{
 	  if (total_annul_slots[j])
 	    {
 	      if (need_comma)
-		fprintf (file, ", ");
+		fprintf (dump_file, ", ");
 	      need_comma = 1;
-	      fprintf (file, "%d got %d delays", total_annul_slots[j], j);
+	      fprintf (dump_file, "%d got %d delays", total_annul_slots[j], j);
 	    }
 	}
-      fprintf (file, "\n");
+      fprintf (dump_file, "\n");
 #endif
-      fprintf (file, "\n");
+      fprintf (dump_file, "\n");
     }
 
   /* For all JUMP insns, fill in branch prediction notes, so that during
diff --git a/gcc/testsuite/gcc.dg/20051206-1.c b/gcc/testsuite/gcc.dg/20051206-1.c
new file mode 100644
index 000000000000..e69de29bb2d1
-- 
GitLab