[Bug tree-optimization/107252] False positive stringop-overflow, warning disappears if I remove unrelated code!
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 13 17:06:54 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Carlos Galvez from comment #2)
> To clarify, even removing things from the second function has an impact on
> the first function (which is where the warning comes from). Shouldn't both
> functions be independent?
No because inlining heuristics takes into account the whole translation unit so
removing things changes how much inlining happens or where it happens (etc.).
The diagnostic with the warning is dependent on the inlining and optimization.
Someone will need to look into the debug dumps to understand what exactly is
going on though.
More information about the Gcc-bugs
mailing list