This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix pr23046
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 18 Sep 2005 20:16:40 -0700
- Subject: Re: [patch] Fix pr23046
- References: <10509190159.AA07587@vlsi1.ultra.nyu.edu>
On Sun, Sep 18, 2005 at 09:59:09PM -0400, Richard Kenner wrote:
> One other issue with option 3 is that we have to be very clear about what
> "doing bounds checks in a different type" means. There has to be a way to
> indicate that these conversions are being done for the purpose of checks and
> that range information cannot be propagated through these conversion.
I'm inclined to think this would be an error already. If type T has
bounds less than the precision, then there should never ever be a
variable of type T with a true value outside those bounds. Which
means you should do all checking *before* you get to type T.
I don't know if that's practical or not though. An alternate is to
emit a VIEW_CONVERT_EXPR for the conversion, and document that VRP
should not look through that expression.
r~