------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni 
dot cz  2004-12-31 01:29 -------
Subject: Re:  [4.0 Regression] not using do-loop for some loops

> (In reply to comment #3)
> What I don't understand is why this was fine in 3.3.2 and not in 4.0.0 by the 
> new do-loop.

Because the analysis in 3.3.2 is buggy.  Doloop pattern is used even in the
following case (in that there is no problem with undefined behavior):

void
f (unsigned n)
{
  unsigned k;
  for(k = 3;k <= n;k++)
    {
    }
}

Which is a misscompilation in case n == ~0.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19210

Reply via email to