[Bug middle-end/89428] missing -Wstringop-overflow on a PHI with variable offset
xerofoify at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Apr 26 08:01:46 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89428
Nicholas Krause <xerofoify at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xerofoify at gmail dot com
--- Comment #2 from Nicholas Krause <xerofoify at gmail dot com> ---
Changing i equal to 1 in the second function gives the warning and gets similar
GIMPLE like this to the first function:
<bb 2> [local count: 1073741824]:
i_3 = MAX_EXPR <i_2(D), 1>;
_1 = &a + i_3;
__builtin_memset (_1, 0, 99); [tail call]
return;
Are we assuming somewhere that zero size offsets should for the first argument
of __builtin_memset to be forgotten about? Because I tried it with multiple
numbers other than zero and they all worked to get GIMPLE similar to the above.
More information about the Gcc-bugs
mailing list