diff options
author | Richard Guenther <rguenther@suse.de> | 2008-05-27 13:10:18 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-05-27 13:10:18 +0000 |
commit | 6fe2f65a17ba8ccadca8e944ce11833bfcbcfb48 (patch) | |
tree | 9e81ea9a2cfa2b3f17aa296af3fde266bee91de1 /gcc | |
parent | 35b80405185fd3f8603c3dea781a29d0e6617262 (diff) | |
download | gcc-6fe2f65a17ba8ccadca8e944ce11833bfcbcfb48.zip gcc-6fe2f65a17ba8ccadca8e944ce11833bfcbcfb48.tar.gz gcc-6fe2f65a17ba8ccadca8e944ce11833bfcbcfb48.tar.bz2 |
re PR tree-optimization/36245 (internal compiler error: in build2_stat, at tree.c:3116)
2008-05-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36245
* tree-ssa-address.c (add_to_parts): Deal with non-pointer
bases.
* gcc.c-torture/compile/pr36245.c: New testcase.
From-SVN: r136029
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-address.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a6d1e21..bbe6eec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-05-27 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/36245 + * tree-ssa-address.c (add_to_parts): Deal with non-pointer + bases. + 2008-05-27 Andreas Krebbel <krebbel1@de.ibm.com> * config/s390/s390.md: Replace all occurences of the 'm' diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index a5119d8..55d43a5 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -423,9 +423,13 @@ add_to_parts (struct mem_address *parts, tree elt) /* Add ELT to base. */ type = TREE_TYPE (parts->base); - parts->base = fold_build2 (POINTER_PLUS_EXPR, type, - parts->base, - fold_convert (sizetype, elt)); + if (POINTER_TYPE_P (type)) + parts->base = fold_build2 (POINTER_PLUS_EXPR, type, + parts->base, + fold_convert (sizetype, elt)); + else + parts->base = fold_build2 (PLUS_EXPR, type, + parts->base, elt); } /* Finds the most expensive multiplication in ADDR that can be |