aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-08-16 13:55:30 +0000
committerRichard Guenther <rguenther@suse.de>2011-08-16 13:55:30 +0000
commitbb30bf4c8cfbe39ec27052f64d700049cc7e0cb5 (patch)
treeea6b5640fb50bd80de0488670f53e68836652312 /gcc/tree-chrec.c
parentbc837754161f94a3608175e2ccdfdb77969acac4 (diff)
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: https://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.c6
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));