[Bug tree-optimization/122473] False-positive -Wstringop-overflow warning when using `-march=x86-64-v3 -O3`

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 28 22:59:21 GMT 2025


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Doing this also works:

  int len = desc->length;
   [[assume (len<9)]];
  for (int i = len; i >= 0; i--) {
    p[i] = desc->pointer[i];
  }


More information about the Gcc-bugs mailing list