https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68636
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- And we also return true thus "known" which will override the type alignment present on the MEM_REF: /* When EXP is an actual memory reference then we can use TYPE_ALIGN of a pointer indirection to derive alignment. Do so only if get_pointer_alignment_1 did not reveal absolute alignment knowledge and if using that alignment would improve the situation. */ if (!addr_p && !known_alignment && TYPE_ALIGN (TREE_TYPE (exp)) > align) align = TYPE_ALIGN (TREE_TYPE (exp));