https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115476
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- In check_trait_type, we do if (kind == 1 && TREE_CODE (type) == ARRAY_TYPE && !TYPE_DOMAIN (type)) return true; // Array of unknown bound. Don't care about completeness. and then end up crashing in record_has_unique_obj_representations: 4836 if (cur != wi::to_offset (sz)) because sz is null. https://en.cppreference.com/w/cpp/types/has_unique_object_representations says "The behavior is undefined if T is an incomplete type other than (possibly cv-qualified) void or array of unknown bound."