/* Return a reference to a type, with its const and volatile qualifiers
removed. */
static inline tree
type_main_variant (tree type)
{
type = TYPE_MAIN_VARIANT (type);
/* ??? There really should be only one main variant among any group of
variants of a given type (and all of the MAIN_VARIANT values for all
members of the group should point to that one type) but sometimes the C
front-end messes this up for array types, so we work around that bug
here. */
if (TREE_CODE (type) == ARRAY_TYPE)
while (type != TYPE_MAIN_VARIANT (type))
type = TYPE_MAIN_VARIANT (type);
return type;
}