This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Improve PR30911 and PR31023, Ada and VRP
On Mon, 31 Mar 2008, Richard Kenner wrote:
> I'm sorry for the late response: I'm travelling at the moment.
> > > That's not correct. Either a object is "invalid" or is bounded by the
> > > ranges of the subtype. And "invalid" is a property that VRP could
> > > potentially detect (it's mostly a static property).
> > But validness is only determined by bounds checking on the base type,
> Certainly not! Were that the case, then my statement would have been
> meaningless. "Validity" is a completely *independent* status of an object.
It's not independend from range bounds, it's just not the only reason for
invalidity. But we aren't talking about other reasons for invalidity.
We are talking only about bound ranges. And about the fact that these
bounds (as manifested via subtypes) can't be relied upon in any
interesting way, and hence are useless. Which wouldn't be much of a
problem, if they in addition to being useless wouldn't also complicate the
compiler and induce many lurking bugs everywhere (e.g. like he middle end
not caring for subtypes much at all).