[Bug rtl-optimization/19210] [4.0 Regression] not using do-loop for some loops
rakdver at atrey dot karlin dot mff dot cuni dot cz
gcc-bugzilla@gcc.gnu.org
Fri Dec 31 00:57:00 GMT 2004
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2004-12-31 00:56 -------
Subject: Re: [4.0 Regression] not using do-loop for some loops
> Zdenek, I have troubles understanding how such a loop can ever be infinite:
>
> - if wrapv, sooner or later K will reach any N (and thus, surely it will become
> less or equal to any given N).
>
> - if nowrapv, my understanding is that all bets are off: if f() is called with
> N<=3 the loop will terminate, otherwise it's undefined behaviour. In such a
> situation, we can still perform doloop because it's not going to screw the
> program any more than it is already.
>
> What am I missing?
I am afraid your interpretation of the code does not make much sense to
me. The loop always terminates except for the case when n == MAX_INT
and -fwrapv. In case n == MAX_INT and -fno-wrapv the behavior is
undefined.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19210
More information about the Gcc-bugs
mailing list