From 27d229f709a928adc7c4e464509cc1633d127f3f Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 20 Dec 2017 12:50:35 +0000 Subject: 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 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 --- gcc/poly-int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/poly-int.h') 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 inline typename if_nonpoly2::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. */ -- cgit v1.1