http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45722
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uweigand at gcc dot gnu.org --- Comment #29 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-12 12:19:15 UTC --- We indeed do rely on type align info on the MEM_REF (which I think is not the very best idea, but I ended up re-instantiating that because it's all a mess). So if SRA rewrites an access it has to transfer misaligned info to the MEM_REF. OTOH, given that we have ;; x$l_3 = MEM[(struct B *)&sB + 2B]; we know the alignment exactly because we can infer it from the DECL alignment of sB. So we might run into the void set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, HOST_WIDE_INT bitpos) { alias_set_type alias = MEM_ALIAS_SET (ref); tree expr = MEM_EXPR (ref); rtx offset = MEM_OFFSET (ref); rtx size = MEM_SIZE (ref); unsigned int align = MEM_ALIGN (ref); ^^^^^^^^^^^^^ bug on strict-alignment targets again here. Uli promised to fix that up but hasn't delivered yet.