===================================================================
@@ -6593,7 +6593,9 @@ type_hash_eq (const void *va, const void
|| !attribute_list_equal (TYPE_ATTRIBUTES (a->type),
TYPE_ATTRIBUTES (b->type))
|| (TREE_CODE (a->type) != COMPLEX_TYPE
- && TYPE_NAME (a->type) != TYPE_NAME (b->type)))
+ && TYPE_NAME (a->type) != TYPE_NAME (b->type))
+ || ((TYPE_MAIN_VARIANT (a->type) == TYPE_MAIN_VARIANT (a->type))
+ != (TYPE_MAIN_VARIANT (b->type) == TYPE_MAIN_VARIANT (b->type))))
return 0;
/* Be careful about comparing arrays before and after the element type