aboutsummaryrefslogtreecommitdiff
path: root/gcc/poly-int.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-20 12:50:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-20 12:50:35 +0000
commit27d229f709a928adc7c4e464509cc1633d127f3f (patch)
tree62059d7d943b688c666005fafa1ce3030be33105 /gcc/poly-int.h
parentf4dd468f5300633d1e40921bf5e910d8a46d1d74 (diff)
downloadgcc-27d229f709a928adc7c4e464509cc1633d127f3f.zip
gcc-27d229f709a928adc7c4e464509cc1633d127f3f.tar.gz
gcc-27d229f709a928adc7c4e464509cc1633d127f3f.tar.bz2
Fix multiple_p for two non-poly_ints
Fix a stupid inversion. This function is very rarely used and was mostly to help split patches up, which is why it didn't get picked up during initial testing. 2017-12-20 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * poly-int.h (multiple_p): Fix handling of two non-poly_ints. gcc/testsuite/ * gcc.dg/plugin/poly-int-tests.h (test_nonpoly_multiple_p): New function. (test_nonpoly_type): Call it. From-SVN: r255860
Diffstat (limited to 'gcc/poly-int.h')
-rw-r--r--gcc/poly-int.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/poly-int.h b/gcc/poly-int.h
index 68788d7..d91244b 100644
--- a/gcc/poly-int.h
+++ b/gcc/poly-int.h
@@ -2027,7 +2027,7 @@ template<typename Ca, typename Cb>
inline typename if_nonpoly2<Ca, Cb, bool>::type
multiple_p (Ca a, Cb b)
{
- return a % b != 0;
+ return a % b == 0;
}
/* Return true if A is a (polynomial) multiple of B. */