> 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
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
> 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.
> I agree. But appearantly fold does not care about base vs. non-base
> types a
On Fri, 23 Feb 2007, Richard Kenner wrote:
> > That said, this whole thing is a can of worms. Suppose the compiler wants
> > to
> > calculate t+1. Of course you do something like this:
> >
> > int_const_binop (PLUS_EXPR, t, build_int_cst (TREE_TYPE (t), 1), 0);
> >
> > But if 1 is not in the
> That said, this whole thing is a can of worms. Suppose the compiler wants to
> calculate t+1. Of course you do something like this:
>
> int_const_binop (PLUS_EXPR, t, build_int_cst (TREE_TYPE (t), 1), 0);
>
> But if 1 is not in the type of t, you just created an invalid value!
Yes, but why n
On Fri, 23 Feb 2007, Duncan Sands wrote:
> > Currently for example in fold_sign_changed_comparison we produce
> > integer constants that are not inside the range of its type values
> > denoted by [TYPE_MIN_VALUE (t), TYPE_MAX_VALUE (t)]. For example
> > consider a type with range [10, 20] and the
> Currently for example in fold_sign_changed_comparison we produce
> integer constants that are not inside the range of its type values
> denoted by [TYPE_MIN_VALUE (t), TYPE_MAX_VALUE (t)]. For example
> consider a type with range [10, 20] and the comparison created by
> the Ada frontend:
>
> i
Currently for example in fold_sign_changed_comparison we produce
integer constants that are not inside the range of its type values
denoted by [TYPE_MIN_VALUE (t), TYPE_MAX_VALUE (t)]. For example
consider a type with range [10, 20] and the comparison created by
the Ada frontend:
if ((signed ch