[Bug middle-end/104966] [11/12 Regression] Yet another bogus -Warray-bounds warning in libstdc++ headers
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 17 12:46:36 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104966
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, the IL definitely has
tem = operator new[] (0);
/* some magic computing with 'positive_sign_size' */
if (min (positive-sign-size, something) != 0)
if (__n == 1)
;
else
{
tem = __n * 4;
if (tem != 0)
__builtin_memmove (dest, ..., tem);
so I guess that "magic" should always evaluate to 0 but we are not able
to figure that out despite the allocation being statically size zero.
You might be able to pin-point the libstdc++ piece with that magic?
More information about the Gcc-bugs
mailing list