[gcc r15-3409] Do not assert NUM_POLY_INT_COEFFS != 1 early
Richard Biener
rguenth@gcc.gnu.org
Tue Sep 3 08:43:08 GMT 2024
https://gcc.gnu.org/g:14b65af6b400284a937e1d3be45579ee8cf8c32b
commit r15-3409-g14b65af6b400284a937e1d3be45579ee8cf8c32b
Author: Richard Biener <rguenther@suse.de>
Date: Tue Sep 3 10:40:41 2024 +0200
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.
Diff:
---
gcc/fold-const.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc
index 2ada59f712bb..70db16759d04 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:
More information about the Gcc-cvs
mailing list