------- Comment #7 from bonzini at gnu dot org 2009-04-23 16:09 ------- Eric, fold only does it for a >= C1 && a <= C2, not for variable C1 and C2. in fact, in this case it would be illegal to do the transformation if the front-end did not know that m->length is positive.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39870