[Bug tree-optimization/108091] '-Wformat-overflow' determines incorrect size when printing strings from an array of structs
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 14 02:26:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108091
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-12-14
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
IV-OPTS produces:
<bb 3> [local count: 858993457]:
# ivtmp.10_13 = PHI <ivtmp.10_14(5), ivtmp.10_15(2)>
_1 = (char[64] *) ivtmp.10_13;
__builtin_strcpy (&str, _1);
ivtmp.10_14 = ivtmp.10_13 + 68;
if (ivtmp.10_14 != _17)
goto <bb 5>; [80.00%]
else
goto <bb 4>; [20.00%]
<bb 5> [local count: 687194763]:
goto <bb 3>; [100.00%]
Which confuses the warning pass.
More information about the Gcc-bugs
mailing list