[Bug middle-end/90367] Spurious warning array subscript is above array bounds
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 6 21:01:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Changing DenseMapBase's
ValueT &operator[](const KeyT &t)
To:
{
const KeyT Key = t;
return FindAndConstruct(Key).second;
}
This will cause the warning to go away.
This comes from:
RemapSwizzle[i] = ....
On a few lines.
GCC does not know that FindAndConstruct does not change the value of its
argument or the argument escapes.
More information about the Gcc-bugs
mailing list