diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-16 13:55:30 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-16 13:55:30 +0000 |
commit | a845d31714483eaf03ecdbb74bddea1ea9212676 (patch) | |
tree | ea6b5640fb50bd80de0488670f53e68836652312 /gcc/tree-chrec.c | |
parent | 5e36e11936341bc6a3c081a5da2377e463fd675d (diff) | |
download | gcc-a845d31714483eaf03ecdbb74bddea1ea9212676.tar.gz |
2011-08-16 Richard Guenther <rguenther@suse.de>
* tree.h (ptrofftype_p): New helper function.
* tree-cfg.c (verify_expr): Use ptrofftype_p for POINTER_PLUS_EXPR
offset verification.
(verify_gimple_assign_binary): Likewise.
* tree.c (build2_stat): Likewise.
* tree-chrec.c (chrec_fold_plus_poly_poly): Likewise.
(reset_evolution_in_loop): Likewise.
* tree-chrec.h (build_polynomial_chrec): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177784 138bc75d-0d04-0410-961f-82ee72b054a4
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)); |