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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Philipp Lucas from comment #2)
> Hm, when I replace getFloat with a simple array lookup the warning
> disappears. But I don't think the possibility that getFloat const_casts
> away the & and manipulates i.i warrants the very explicit warning
> "arrayTags[i] = hasOption(i);".

The reason why removing the reference from getFloat works is because then GCC
can tell the branch (i>=MAX_NUM) inside hasOption (which was inlined) is always
false and no longer jump threads.

Reply via email to