Commit 6fe2f65a by Richard Guenther Committed by Richard Biener

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
parent 35b80405
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> 2008-05-27 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md: Replace all occurences of the 'm' * config/s390/s390.md: Replace all occurences of the 'm'
......
...@@ -423,9 +423,13 @@ add_to_parts (struct mem_address *parts, tree elt) ...@@ -423,9 +423,13 @@ add_to_parts (struct mem_address *parts, tree elt)
/* Add ELT to base. */ /* Add ELT to base. */
type = TREE_TYPE (parts->base); type = TREE_TYPE (parts->base);
parts->base = fold_build2 (POINTER_PLUS_EXPR, type, if (POINTER_TYPE_P (type))
parts->base, parts->base = fold_build2 (POINTER_PLUS_EXPR, type,
fold_convert (sizetype, elt)); 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 /* Finds the most expensive multiplication in ADDR that can be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment