This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
- From: "baldrick at free dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2007 08:18:12 -0000
- Subject: [Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
- References: <bug-30911-13647@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #38 from baldrick at free dot fr 2007-03-01 08:18 -------
Subject: Re: VRP fails to eliminate range checks in Ada code
> ... The problem
> is that the value of arg1, a constant, is not in the
> range of its own type! ...
It seemed clear to me last night why this is a problem,
but now I can't see why anymore... Types don't seem
very useful for constants (why do they have a type at
all?), and if you take the viewpoint that you should
just ignore the constant's type, then being out of
range is not relevant. So the question becomes: how
did this constant get created, and why does its type
seem to matter...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911