This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada subtypes and base types (was: Bootstrap failure on trunk: x86_64-linux-gnu)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Richard Kenner" <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 20 Feb 2006 23:00:25 +0100
- Subject: Re: Ada subtypes and base types (was: Bootstrap failure on trunk: x86_64-linux-gnu)
- References: <10602202158.AA06204@vlsi1.ultra.nyu.edu>
On 2/20/06, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
> Indeed. Ada should in this case generate
>
> R = (T)( (basetype)100 + (basetype)X - (basetype)X )
>
> i.e. carry out all arithmetic explicitly in the basetype and only for
> stores and loads use the subtype.
>
> That is indeed required by the language and what is normally generated.
> It would be valuable to see exactly who generated the bogus operation.
>
Indeed - I can very well imagine fold or ccp stripping off such type conversions
in some case, which would lead to wrong code by VRP.
Richard.