On Saturday 24 February 2007 14:27:36 Richard Kenner wrote:
> > Sure - I wonder if there is a reliable way of testing whether we face
> > a non-base type in the middle-end.  I suppose TREE_TYPE (type) != NULL
> > won't work in all cases... (?)
> 
> That's the right way as far as I know.

Note that having TREE_TYPE(type)!=NULL does not imply that the type and the
base type are inequivalent.  For example, if you declare a type Int as follows:
        subtype Int is Integer;
then TREE_TYPE(type_for_Int)=type_for_Integer, but the types are equivalent,
in particular they have the same TYPE_MIN_VALUE and TYPE_MAX_VALUE.

Ciao,

Duncan.

Reply via email to