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