This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada subtypes and base types
- From: Jeffrey A Law <law at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 23 Feb 2006 17:59:53 -0700
- Subject: Re: Ada subtypes and base types
- References: <10602221825.AA26233@vlsi1.ultra.nyu.edu>
- Reply-to: law at redhat dot com
On Wed, 2006-02-22 at 13:25 -0500, Richard Kenner wrote:
> When I speak about doing arithmetic in a type, I'm referring to the
> type of the expression & its input operands in a gimplified
> expression. At that point I do not care about base types or anything
> like that. All that should matter is TREE_TYPE (expr), nothing more,
> nothing less. How the inputs are converted or how the output is later
> converted is not a concern -- all that matters is TREE_TYPE (expr) in
> a gimplified tree.
>
> Can we agree on that?
>
> Yes.
>
> The base type reference is that I'm *also* saying "If you see an arithmetic
> node where TREE_TYPE is *not* a base type, there's a bug someplace that
> has to be fixed". (Well, with the exception of such things as sizetypes
> or subtypes that don't actually change anything.)
Just to make sure I've dotted the i's and crossed the t's, this
is not what's happening when we hang in VRP when compiling a-textio.
We convert the incoming object from natural___XDLU_0___2147483647
into its base type, perform the addition in the base type, then
convert back to XDLU_0_2147483647.
Jeff