diff options
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index f9bebee7fe6..9ceb6f0cf4d 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -95,14 +95,14 @@ chrec_fold_plus_poly_poly (enum tree_code code, tree left, right; struct loop *loop0 = get_chrec_loop (poly0); struct loop *loop1 = get_chrec_loop (poly1); - tree rtype = code == POINTER_PLUS_EXPR ? sizetype : type; + tree rtype = code == POINTER_PLUS_EXPR ? chrec_type (poly1) : type; gcc_assert (poly0); gcc_assert (poly1); gcc_assert (TREE_CODE (poly0) == POLYNOMIAL_CHREC); gcc_assert (TREE_CODE (poly1) == POLYNOMIAL_CHREC); if (POINTER_TYPE_P (chrec_type (poly0))) - gcc_assert (chrec_type (poly1) == sizetype); + gcc_assert (ptrofftype_p (chrec_type (poly1))); else gcc_assert (chrec_type (poly0) == chrec_type (poly1)); gcc_assert (type == chrec_type (poly0)); @@ -831,7 +831,7 @@ reset_evolution_in_loop (unsigned loop_num, struct loop *loop = get_loop (loop_num); if (POINTER_TYPE_P (chrec_type (chrec))) - gcc_assert (sizetype == chrec_type (new_evol)); + gcc_assert (ptrofftype_p (chrec_type (new_evol))); else gcc_assert (chrec_type (chrec) == chrec_type (new_evol)); |