This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C,C++,Ada,Java,F77] opt/5076 and opt/2847
On Wed, Jan 30, 2002 at 10:28:34AM -0800, Mark Mitchell wrote:
> Why are we getting the wrong answer in expand_end_loop?
while (test == 0)
{
inc ();
if (iNbr == 0)
break;
else
The (iNbr == 0) test looks like part of the conditional since
it jumps to the end of the loop. That leaves us with just
{
inc ();
iNbr--;
}
test = 1;
as the body of the loop, which has too few calls to inc().
> It seems that the simplest thing might be just to notice how
> it's broken, and perhaps conservatively punt at that point if
> it's a case we cannot handle?
How do you tell the difference between a call+test in the condition
and a call+test+break in the body? I don't think we can.
The only way I could think is by having a marker.
r~
- References:
- [C,C++,Ada,Java,F77] opt/5076 and opt/2847
- Re: [C,C++,Ada,Java,F77] opt/5076 and opt/2847
- Re: [C,C++,Ada,Java,F77] opt/5076 and opt/2847
- Re: [C,C++,Ada,Java,F77] opt/5076 and opt/2847