http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57748
--- Comment #13 from Martin Jambor <jamborm at gcc dot gnu.org> --- Created attachment 30583 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30583&action=edit Untested fix This is how I'd like to fix the problem if the patch passes bootstrap and testing (on x86_64-linux, any additional testing welcome). I believe that the problem is that while compute_record_mode in stor-layout.c makes sure it assigns BLK mode to structs with flexible arrays, it has no such provisions for zero length arrays (http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Zero-Length.html). I think that in order to avoid problems and surprises like this one, we should assign both variable array possibilities the same mode.