> Such types are still there for enumeral type kinds.  Also the C family
> frontends leak arithmetic in array TYPE_DOMAIN types.

The arithmetic needs to be fixed to use the base type instead (i.e. TREE_TYPE 
of type, which is guaranteed to be sizetype for TYPE_DOMAIN types).

> I don't see how we can do this for ENUM types.  We use the
> TYPE_MIN/MAX_VALUEs for debug information.

Like Ada. There is a hook (get_subrange_bounds), see subrange_type_for_debug_p.

> I tried to assert this for INTEGER_TYPEs only, but as noted above the
> C family leaks TYPE_DOMAIN arithmetic.

Gigi used to do so as well, now it always uses the base type.

-- 
Eric Botcazou

Reply via email to