This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]