Patchwork [committed] Correct signedness warning in gimple-ssa-strength-reduction.c

login
register
mail settings
Submitter William J. Schmidt
Date May 8, 2013, 5:08 p.m.
Message ID <1368032891.4938.37.camel@oc8801110288.ibm.com>
Download mbox | patch
Permalink /patch/242612/
State New
Headers show

Comments

William J. Schmidt - May 8, 2013, 5:08 p.m.
This corrects a signed/unsigned comparison.  Regstrapped on
powerpc64-unknown-linux-gnu, committed as obvious.

Thanks,
Bill


2013-05-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gimple-ssa-strength-reduction.c (count_candidates): Change
	return value to int.
	(analyze_candidates_and_replace): Change type of length to int.

Patch

Index: gcc/gimple-ssa-strength-reduction.c
===================================================================
--- gcc/gimple-ssa-strength-reduction.c	(revision 198713)
+++ gcc/gimple-ssa-strength-reduction.c	(working copy)
@@ -2259,7 +2259,7 @@  replace_uncond_cands_and_profitable_phis (slsr_can
 /* Count the number of candidates in the tree rooted at C that have
    not already been replaced under other interpretations.  */
 
-static unsigned
+static int
 count_candidates (slsr_cand_t c)
 {
   unsigned count = cand_already_replaced (c) ? 0 : 1;
@@ -3361,7 +3361,7 @@  analyze_candidates_and_replace (void)
 	 less expensive to calculate than the replaced statements.  */
       else
 	{
-	  unsigned length;
+	  int length;
 	  enum machine_mode mode;
 	  bool speed;