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: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2007 09:02:15 -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 #41 from rguenth at gcc dot gnu dot org 2007-03-02 09:02 -------
Thaks for the detective work! I sort of expected the fold patch to be weird or
have no effect - but it was needed only (for the testcase) to get rid of the
target_first == 128 comparison, as that is confusing VRP. Basically after this
comparison we conclude target_first != 128 and drop the earlier target_first !=
10
assertion which is the one we can use to optimize the later comparisons.
So the other solution is to simply not record out-of-bounds assertions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911