===================================================================
@@ -8074,7 +8074,6 @@ build_ptrmemfunc_type (tree type)
= build_ptrmemfunc_type (TYPE_MAIN_VARIANT (type));
t = make_class_type (RECORD_TYPE);
- xref_basetypes (t, NULL_TREE);
/* Let the front end know this is a pointer to member function... */
TYPE_PTRMEMFUNC_FLAG (t) = 1;
@@ -8109,8 +8108,10 @@ build_ptrmemfunc_type (tree type)
TYPE_MAIN_VARIANT (t) = unqualified_variant;
TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (unqualified_variant);
TYPE_NEXT_VARIANT (unqualified_variant) = t;
- TREE_TYPE (TYPE_BINFO (t)) = t;
+ TYPE_BINFO (t) = TYPE_BINFO (unqualified_variant);
}
+ else
+ xref_basetypes (t, NULL_TREE);
/* Cache this pointer-to-member type so that we can find it again
later. */