This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Stickiness of TYPE_MIN_VALUE/TYPE_MAX_VALUE
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 30 May 2005 16:03:45 -0400
- Subject: Re: Stickiness of TYPE_MIN_VALUE/TYPE_MAX_VALUE
- References: <87mzqco57z.fsf@deneb.enyo.de>
On Mon, May 30, 2005 at 09:59:12PM +0200, Florian Weimer wrote:
> How sticky are TYPE_MIN_VALUE and TYPE_MAX_VALUE? Is it possible to
> get rid of their effect using a NOP_EXPR, CONVERT_EXPR or
> VIEW_CONVERT_EXPR?
>
> If this is impossible, the Ada front end should probably stop setting
> these fields because it assumes that it can use values outside that
> range:
>
> <http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gnat_ugn_unw/Validity-Checking.html>
>
> Current mainline does not optimize array range checks away (even with
> -ftree-vrp), but I'm not sure if this is just a missed optimization
> opportunity as far as the optimizers are concerned, or something which
> is guaranteed to work in the future.
>
Missed on purpose because of the bootstrap bug I worked-around a
few weeks ago. See the comment in tree-vrp.c:extract_range_from_assert
regarding integral types with super-types.
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00127.html
If this is not what's biting you, send me a test case? I've got
some local VRP changes that address a few of the limitations of
the existing implementation.
Diego.