------- Comment #8 from rguenth at gcc dot gnu dot org 2010-07-08 12:47 -------
(In reply to comment #7)
> We end up with
>
> MEM[(struct s *)D.2742_15 + 8B] = 0;
> MEM[(struct s *)D.2742_15 + 12B] = 0;
> MEM[(struct s *)D.2742_15 + 16B] = 0;
>
> from which set_mem_attributes_minus_bitpos incorrectly concludes that
> D.2742_15 points to sth that is aligned the same as struct s here:
>
> else
> /* This technically isn't correct. We can't really derive
> alignment information from types. */
> align = MAX (align,
> TYPE_ALIGN (TREE_TYPE (TREE_TYPE (TREE_OPERAND (t,
> 1)))));
>
> and the comment is correct.
Where the alternative would have been
else
/* This technically isn't correct. We can't really derive
alignment information from types. */
align = MAX (align, TYPE_ALIGN (TREE_TYPE (t)));
and the comment would still be correct as a MEM_REF has an embedded
VIEW_CONVERT_EXPR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44843