------- Comment #23 from rguenther at suse dot de 2009-02-18 09:34 ------- Subject: Re: loop number of iterations analysis not working
On Wed, 18 Feb 2009, rakdver at kam dot mff dot cuni dot cz wrote: > > > ------- Comment #21 from rakdver at kam dot mff dot cuni dot cz 2009-02-18 > 04:11 ------- > Subject: Re: loop number of iterations analysis not working > > > If the program terminates before i would wrap, then the number of > > iterations was not MAXINT. > > And since it can't wrap, it is not infinite in any case. > > > > I agree you can't prove the number of iterations (since bar could > > exit), but the requiring the assumption i != MAXINT still seems > > useless. > > What do you propose that the number of iterations analysis should > return, then? Note that the function call is artificial in the testcase (just to make the loop non-empty). A poor choice admittedly ;) But yes, I expected that i != MAXINT follows from i's signedness. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26939