http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59134
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- typedef struct { char pad; int arr[0]; } __attribute__((packed)) str; str * foo (int* src) { str *s = __builtin_malloc (sizeof (str) + sizeof (int)); s->arr[0] = 0x12345678; return s; } as said elsewhere - IMHO the mode on op0 should not be that of the base object (QImode) but that of the access (SImode).