On Wed, 20 Jul 2011, Ulrich Weigand wrote: > Richard Sandiford wrote: > > > /* Now set the attributes we computed above. */ > > - MEM_ATTRS (ref) > > - = find_mem_attrs (alias, expr, offset, size, align, > > - TYPE_ADDR_SPACE (type), GET_MODE (ref)); > > + set_mem_attrs (ref, &attrs); > > This removes the bit where the MEM's address space is initialized > to the type's address space, which fundamentally breaks named > address space suppport ... > > I guess we need something like the patch below to restore the > old behaviour. > > OK for mainline?
Ok. Do we have any chance of adding generic testcases for named-address-space support that would show these issues? Thanks, Richard. > Bye, > Ulrich > > ChangeLog: > > * emit-rtl.c (set_mem_attributes_minus_bitpos): Restore setting > memory address space to the type's address space. > > Index: gcc/emit-rtl.c > =================================================================== > *** gcc/emit-rtl.c (revision 176499) > --- gcc/emit-rtl.c (working copy) > *************** set_mem_attributes_minus_bitpos (rtx ref > *** 1845,1850 **** > --- 1845,1851 ---- > } > > /* Now set the attributes we computed above. */ > + attrs.addrspace = TYPE_ADDR_SPACE (type); > set_mem_attrs (ref, &attrs); > > /* If this is already known to be a scalar or aggregate, we are done. */ > > > -- Richard Guenther <rguent...@suse.de> Novell / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer