diff options
author | Richard Biener <rguenther@suse.de> | 2024-09-03 10:40:41 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-09-03 10:42:50 +0200 |
commit | 14b65af6b400284a937e1d3be45579ee8cf8c32b (patch) | |
tree | e9999f56b3ec89a7322c7a11a249adee4e9ee5b9 /gcc/fold-const.cc | |
parent | d4d75a83007e884bfcd632ea3b3269704496f048 (diff) | |
download | gcc-14b65af6b400284a937e1d3be45579ee8cf8c32b.zip gcc-14b65af6b400284a937e1d3be45579ee8cf8c32b.tar.gz gcc-14b65af6b400284a937e1d3be45579ee8cf8c32b.tar.bz2 |
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.
Diffstat (limited to 'gcc/fold-const.cc')
-rw-r--r-- | gcc/fold-const.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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: |