Hi!

I've noticed a new -Wsign-compare warning on 4.8 branch, this
patch just changes the code to look like on the trunk.
This is all guarded with if (dist > 0), so the cast is harmless.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed
to trunk as obvious.

2014-03-06  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/60276
        * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Avoid
        a -Wsign-compare warning.

--- gcc/tree-vect-data-refs.c.jj        2014-03-05 21:55:53.000000000 +0100
+++ gcc/tree-vect-data-refs.c   2014-03-05 22:38:29.004898095 +0100
@@ -744,7 +744,7 @@ vect_analyze_data_ref_dependence (struct
             Only need to handle read-after-write dependence.  */
          if (DR_IS_READ (drb)
              && (STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) == 0
-                 || STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) > dist))
+                 || STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) > (unsigned)dist))
            STMT_VINFO_MIN_NEG_DIST (stmtinfo_b) = dist;
          continue;
        }

        Jakub

Reply via email to