This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

profile.c/flow.c: Fix error messages



I got this error message using -f-fbranch-probabilities:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bits.c: In function `bi_init':
bits.c:113: Corrupted profile info: prob for 0-1 thought to be -1

bits.c:113: Corrupted profile info: prob for 1-2 thought to be -1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The extra newline is bogus.  A quick grep showed one more such problem
in flow.c.

I've  bootstrapping/regtesting the patch on i686-linux.

Ok to commit?

Andreas

2001-08-20  Andreas Jaeger  <aj@suse.de>

	* profile.c (compute_branch_probabilities): Remove extra new-line
	in error message.
	* flow.c (verify_flow_info): Likewise.

============================================================
Index: gcc/profile.c
--- gcc/profile.c	2001/08/18 19:59:45	1.67
+++ gcc/profile.c	2001/08/20 05:29:38
@@ -428,7 +428,7 @@
 	      e->probability = (e->count * REG_BR_PROB_BASE + total / 2) / total;
 	      if (e->probability < 0 || e->probability > REG_BR_PROB_BASE)
 		{
-		  error ("Corrupted profile info: prob for %d-%d thought to be %d\n",
+		  error ("Corrupted profile info: prob for %d-%d thought to be %d",
 			 e->src->index, e->dest->index, e->probability);
 		  e->probability = REG_BR_PROB_BASE / 2;
 		}
============================================================
Index: gcc/flow.c
--- gcc/flow.c	2001/08/19 03:04:17	1.465
+++ gcc/flow.c	2001/08/20 05:33:06
@@ -8512,7 +8512,7 @@
 	}
       if (!NOTE_INSN_BASIC_BLOCK_P (x) || NOTE_BASIC_BLOCK (x) != bb)
 	{
-	  error ("NOTE_INSN_BASIC_BLOCK is missing for block %d\n",
+	  error ("NOTE_INSN_BASIC_BLOCK is missing for block %d",
 		 bb->index);
 	  err = 1;
 	}

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]