-/* We consider two types compatible if they have the same main variant,
- but we also consider two array types compatible if they have the same
- component type and bounds.
-
- ??? We may also want to generalize to considering lots of integer types
- compatible, but we need to understand the effects of alias sets first. */
-
-static int
-gnat_types_compatible_p (tree x, tree y)
-{
- if (TREE_CODE (x) == ARRAY_TYPE && TREE_CODE (y) == ARRAY_TYPE
- && gnat_types_compatible_p (TREE_TYPE (x), TREE_TYPE (y))
- && operand_equal_p (TYPE_MIN_VALUE (TYPE_DOMAIN (x)),
- TYPE_MIN_VALUE (TYPE_DOMAIN (y)), 0)
- && operand_equal_p (TYPE_MAX_VALUE (TYPE_DOMAIN (x)),
- TYPE_MAX_VALUE (TYPE_DOMAIN (y)), 0))
- return 1;
- else
- return TYPE_MAIN_VARIANT (x) == TYPE_MAIN_VARIANT (y);
-}
-