diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2007-08-04 00:33:31 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-08-03 17:33:31 -0700 |
commit | a83e7facc5549687bfee14f24850528e79bb5a95 (patch) | |
tree | 5bc2b122837ec11f3ca351c56ec17682a79d19ee /gcc/tree-ssa-address.c | |
parent | 814d1e640cb413318401505edb6dde08e8b6f936 (diff) | |
download | gcc-a83e7facc5549687bfee14f24850528e79bb5a95.zip gcc-a83e7facc5549687bfee14f24850528e79bb5a95.tar.gz gcc-a83e7facc5549687bfee14f24850528e79bb5a95.tar.bz2 |
re PR middle-end/32399 (ICE in build2_stat, at tree.c:3074)
2007-08-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/32399
* tree-ssa-address.c (add_to_parts): Use POINTER_PLUS_EXPR
when adding to the base and convert ELT to sizetype instead of type.
2007-08-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
RP middle-end/32399
* gcc.c-torture/compile/pr32399.c: New testcase.
From-SVN: r127196
Diffstat (limited to 'gcc/tree-ssa-address.c')
-rw-r--r-- | gcc/tree-ssa-address.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 577ede3..90a01dc 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -422,9 +422,9 @@ add_to_parts (struct mem_address *parts, tree elt) /* Add ELT to base. */ type = TREE_TYPE (parts->base); - parts->base = fold_build2 (PLUS_EXPR, type, + parts->base = fold_build2 (POINTER_PLUS_EXPR, type, parts->base, - fold_convert (type, elt)); + fold_convert (sizetype, elt)); } /* Finds the most expensive multiplication in ADDR that can be |