From 14b65af6b400284a937e1d3be45579ee8cf8c32b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 3 Sep 2024 10:40:41 +0200 Subject: Do not assert NUM_POLY_INT_COEFFS != 1 early The following moves the assert on NUM_POLY_INT_COEFFS != 1 after INTEGER_CST processing. * fold-const.cc (poly_int_binop): Move assert on NUM_POLY_INT_COEFFS after INTEGER_CST processing. --- gcc/fold-const.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/fold-const.cc') diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 2ada59f..70db167 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -1241,7 +1241,6 @@ poly_int_binop (poly_wide_int &res, enum tree_code code, const_tree arg1, const_tree arg2, signop sign, wi::overflow_type *overflow) { - gcc_assert (NUM_POLY_INT_COEFFS != 1); gcc_assert (poly_int_tree_p (arg1) && poly_int_tree_p (arg2)); if (TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (arg2) == INTEGER_CST) @@ -1254,6 +1253,8 @@ poly_int_binop (poly_wide_int &res, enum tree_code code, return true; } + gcc_assert (NUM_POLY_INT_COEFFS != 1); + switch (code) { case PLUS_EXPR: -- cgit v1.1