https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64491

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Andrew Stubbs from comment #8)
> Just silencing the warning may not be enough. The compiler may optimize away
> loop exit conditions based on this analysis. The warning mirrors the logic
> rather than shares it (due to the way the logic is distributed) so this may
> not actually be a problem, in this case, but I'd have to look closer.

Sure, it is desirable if the compiler optimizes away the loop exit test, it
really is dead, because the loop will always be exit through the other loop
exit earlier.  But there is no user bug in there, so you shouldn't emit a false
positive.

Reply via email to