aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-07-08 08:16:50 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-07-08 08:16:50 +0000
commit14abfad10897da9d7e3af1d66df191273682cc70 (patch)
treee59cc70dd78a43287fac5b4d1f1622f6c345f8cf
parent62ee314561e619584e71e5484dbad2920628089e (diff)
downloadgcc-14abfad10897da9d7e3af1d66df191273682cc70.zip
gcc-14abfad10897da9d7e3af1d66df191273682cc70.tar.gz
gcc-14abfad10897da9d7e3af1d66df191273682cc70.tar.bz2
fold-const.c (fold_widened_comparison): Fix inverted comparison.
2015-07-08 Richard Biener <rguenther@suse.de> * fold-const.c (fold_widened_comparison): Fix inverted comparison. From-SVN: r225535
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/fold-const.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 63c1d0c..e8b4b10 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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".
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index a81807e..0ad7d86 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -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