Commit 69bd3423 by Zdenek Dvorak

tree-ssa-address.c (create_mem_ref): Do not put an expression containing a cast…

tree-ssa-address.c (create_mem_ref): Do not put an expression containing a cast to the base of TARGET_MEM_REF.

	* tree-ssa-address.c (create_mem_ref): Do not put an expression
	containing a cast to the base of TARGET_MEM_REF.

From-SVN: r122528
parent 23204428
2007-03-04 Zdenek Dvorak <dvorakz@suse.cz>
* tree-ssa-address.c (create_mem_ref): Do not put an expression
containing a cast to the base of TARGET_MEM_REF.
2007-03-04 Martin Michlmayr <tbm@cyrius.com> 2007-03-04 Martin Michlmayr <tbm@cyrius.com>
* tree.c (tree_contains_struct_check_failed): Remove spurious * tree.c (tree_contains_struct_check_failed): Remove spurious
...@@ -10,7 +15,7 @@ ...@@ -10,7 +15,7 @@
instead of precision. instead of precision.
2007-03-04 Roman Zippel <zippel@linux-m68k.org> 2007-03-04 Roman Zippel <zippel@linux-m68k.org>
Nathan Sidwell <nathan@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com>
* emit-rtl.c (find_auto_inc): New. * emit-rtl.c (find_auto_inc): New.
(try_split): recreate REG_INC notes, (try_split): recreate REG_INC notes,
......
...@@ -569,7 +569,7 @@ tree ...@@ -569,7 +569,7 @@ tree
create_mem_ref (block_stmt_iterator *bsi, tree type, aff_tree *addr) create_mem_ref (block_stmt_iterator *bsi, tree type, aff_tree *addr)
{ {
tree mem_ref, tmp; tree mem_ref, tmp;
tree addr_type = build_pointer_type (type), atype; tree atype;
struct mem_address parts; struct mem_address parts;
addr_to_parts (addr, &parts); addr_to_parts (addr, &parts);
...@@ -597,18 +597,23 @@ create_mem_ref (block_stmt_iterator *bsi, tree type, aff_tree *addr) ...@@ -597,18 +597,23 @@ create_mem_ref (block_stmt_iterator *bsi, tree type, aff_tree *addr)
if (parts.symbol) if (parts.symbol)
{ {
tmp = fold_convert (addr_type, tmp = build_addr (parts.symbol, current_function_decl);
build_addr (parts.symbol, current_function_decl)); gcc_assert (is_gimple_val (tmp));
/* Add the symbol to base, eventually forcing it to register. */ /* Add the symbol to base, eventually forcing it to register. */
if (parts.base) if (parts.base)
{ {
gcc_assert (TREE_TYPE (parts.base) == sizetype);
if (parts.index) if (parts.index)
parts.base = force_gimple_operand_bsi (bsi, {
fold_build2 (PLUS_EXPR, addr_type, atype = TREE_TYPE (tmp);
fold_convert (addr_type, parts.base), parts.base = force_gimple_operand_bsi (bsi,
fold_build2 (PLUS_EXPR, atype,
fold_convert (atype, parts.base),
tmp), tmp),
true, NULL_TREE); true, NULL_TREE);
}
else else
{ {
parts.index = parts.base; parts.index = parts.base;
......
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