[Bug ipa/105438] [11/12/13 Regression] Incorrect array-bounds warning with array size carried over from a previous template instantiation since r11-4987-g602c6cfc79ce4ae6 since r11-4987-g602c6cfc79ce4ae6

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 3 12:42:54 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
So the 2 following functions are merged:

void _Z9configureILi7EEvRAT__Kii.part.0<7> (const int[7] & in, const int nrows)
{
...

void _Z9configureILi2EEvRAT__Kii.part.0<2> (const int[2] & in, const int nrows)
{
...

which have a different argument in. However I don't think one can't end with a
wrong code as nrows argument would be different in:

  _Z9configureILi7EEvRAT__Kii.part.0<7> (&longer, 7);
  _Z9configureILi2EEvRAT__Kii.part.0<2> (&shorter, 2);

I was unable to come up with a code that would be miscompiled.


More information about the Gcc-bugs mailing list