From 14abfad10897da9d7e3af1d66df191273682cc70 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 8 Jul 2015 08:16:50 +0000 Subject: [PATCH] fold-const.c (fold_widened_comparison): Fix inverted comparison. 2015-07-08 Richard Biener * fold-const.c (fold_widened_comparison): Fix inverted comparison. From-SVN: r225535 --- gcc/ChangeLog | 4 ++++ gcc/fold-const.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63c1d0cbd44..e8b4b10079e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-07-08 Richard Biener + + * fold-const.c (fold_widened_comparison): Fix inverted comparison. + 2015-07-08 Alan Modra * target.def (rtx_costs): Remove "code" param, add "mode". diff --git a/gcc/fold-const.c b/gcc/fold-const.c index a81807ed220..0ad7d86ea1a 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 -- 2.30.2