This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/19210] [4.0 Regression] not using do-loop for some loops
- From: "rakdver at atrey dot karlin dot mff dot cuni dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Dec 2004 01:29:31 -0000
- Subject: [Bug rtl-optimization/19210] [4.0 Regression] not using do-loop for some loops
- References: <20041230204442.19210.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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