diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-04-06 21:02:25 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-04-06 21:02:25 +0000 |
commit | dbe0d6521664869b3b0d1f9e24f0a4e657964fe8 (patch) | |
tree | 0f05a05c12608e15fe8f27a875fb288e6cbd0a82 /gcc/graphite-clast-to-gimple.c | |
parent | bd32f344edf8c50779ab8822236f1577a7649a1d (diff) | |
download | gcc-dbe0d6521664869b3b0d1f9e24f0a4e657964fe8.tar.gz |
Use POINTER_PLUS_EXPR for pointer types.
2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43519
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
POINTER_PLUS_EXPR for pointer types.
* gcc.dg/graphite/id-19.c: New.
From-SVN: r158027
Diffstat (limited to 'gcc/graphite-clast-to-gimple.c')
-rw-r--r-- | gcc/graphite-clast-to-gimple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 6aab2a5521c..106ff7c5e7a 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -1035,7 +1035,8 @@ graphite_create_new_loop_guard (sese region, edge entry_edge, one = gmp_cst_to_tree (type, gmp_one); value_clear (gmp_one); - ub = fold_build2 (PLUS_EXPR, type, ub, one); + ub = fold_build2 (POINTER_TYPE_P (type) ? POINTER_PLUS_EXPR : PLUS_EXPR, + type, ub, one); cond_expr = fold_build2 (LT_EXPR, boolean_type_node, lb, ub); exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr); |