https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97323
--- Comment #10 from Richard Henderson <rth at gcc dot gnu.org> --- Created attachment 49473 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49473&action=edit rfc patch The following fixes the ICE. It seems like a hack, done at the wrong level. Should we have in fact set TYPE_STRUCTURAL_EQUALITY_P all the way back on the unaligned 'a' type, before we even try to create an array of 'a'? If so, that would have properly triggered the test here in build_array_type_1 that would have bypassed the problem.