http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43808
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-08 15:21:41 UTC --- Indeed, for x: (mem/s:DI (reg/f:DI 117 [ D.1692 ]) [6 MEM[(struct a[2] *)D.1692_63]+0 S8 A64]) mem: (mem/s/f/c:DI (plus:DI (reg/f:DI 20 frame) (const_int -384 [0xfffffffffffffe80])) [3 D.1548.i.data+0 S8 A64]) rtx_refs_may_alias_p (x, mem, 0) returns 0. indirect_ref_may_alias_decl_p is called with base1 the MEM_REF and base2 VAR_DECL D.1548. And the problem is that may_be_aliased is false for D.1548. Sure, it doesn't have address taken. But as expansion decided to share its slot together with other variables and those are may_be_aliased, this of course breaks. I wonder whether expansion shouldn't somehow make sure that if at least one var in the partition is may_be_aliased, all of them are. Be it by not merging vars that have different may_be_aliased, or by say marking the non-addressable vars TREE_ADDRESSABLE if anything in the partition is addressable. Richard?