https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108910
--- Comment #18 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #13) > Jason, any thoughts on why we for build_type_attribute_qual_variant call > build_distinct_type_copy rather than build_variant_type_copy That does seem weird. It should probably depend on whether any of the attributes have affects_type_identity. And so should setting of TYPE_CANONICAL. Unless we never use it with such attributes, in which case we should checking_assert that, and always use build_variant_type_copy.