fold-const.c (fold_widened_comparison): Fix inverted comparison.
authorRichard Biener <rguenther@suse.de>
Wed, 8 Jul 2015 08:16:50 +0000 (08:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 8 Jul 2015 08:16:50 +0000 (08:16 +0000)
2015-07-08  Richard Biener  <rguenther@suse.de>

* fold-const.c (fold_widened_comparison): Fix inverted comparison.

From-SVN: r225535

gcc/ChangeLog
gcc/fold-const.c

index 63c1d0cbd448ac67328b5d8dbb940ef9d5e05815..e8b4b10079e886539dd01b7f17c9effa90f68a6c 100644 (file)
@@ -1,3 +1,7 @@
+2015-07-08  Richard Biener  <rguenther@suse.de>
+
+       * fold-const.c (fold_widened_comparison): Fix inverted comparison.
+
 2015-07-08  Alan Modra  <amodra@gmail.com>
 
        * target.def (rtx_costs): Remove "code" param, add "mode".
index a81807ed220e37ae708bc8a92bab27d674214397..0ad7d86ea1ae000b563448756fd53af8d1b1d1f3 100644 (file)
@@ -6787,7 +6787,7 @@ fold_widened_comparison (location_t loc, enum tree_code code,
 
   if (TREE_CODE (arg1_unw) != INTEGER_CST
       || TREE_CODE (shorter_type) != INTEGER_TYPE
-      || !int_fits_type_p (arg1_unw, shorter_type))
+      || int_fits_type_p (arg1_unw, shorter_type))
     return NULL_TREE;
 
   /* If we are comparing with the integer that does not fit into the range