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: 17 Nov 2009 11:04:33 -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 #69 from baldrick at free dot fr 2009-11-17 11:04 -------
It seems that variables produced by the Ada front-end no longer have any
non-trivial range information associated with them. Without knowing the
range information
type S is range 0 .. 100;
type T is range 10 .. 20;
it is impossible for the optimizers to eliminate most of the range checks
in this testcase. With the range information all of the checks can in theory
be removed. This is an example of how range information is potentially very
helpful for optimizing Ada programs.
Is there anyway for the optimizers to get at this range information still?
Or was range information removed because it is essentially impossible to use
it correctly (if so this bug report should be closed as unfixable)?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911