From fc41dd820f53334fd95a07641cbbd733b7b9259b Mon Sep 17 00:00:00 2001 From: bstarynk Date: Fri, 27 May 2011 08:35:25 +0000 Subject: 2011-05-27 Basile Starynkevitch MELT branch merged with trunk rev 174319 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@174323 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-address.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/tree-ssa-address.c') diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 07d1d4db43b..2e6eabc8ccb 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -361,8 +361,11 @@ create_mem_ref_raw (tree type, tree alias_ptr_type, struct mem_address *addr, index2 = addr->base; } - /* If possible use a plain MEM_REF instead of a TARGET_MEM_REF. */ - if (alias_ptr_type + /* If possible use a plain MEM_REF instead of a TARGET_MEM_REF. + ??? As IVOPTs does not follow restrictions to where the base + pointer may point to create a MEM_REF only if we know that + base is valid. */ + if (TREE_CODE (base) == ADDR_EXPR && (!index2 || integer_zerop (index2)) && (!addr->index || integer_zerop (addr->index))) return fold_build2 (MEM_REF, type, base, addr->offset); -- cgit v1.2.1