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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> [apinski@xeond2 upstream-gcc-git]$ gdb --args ./gcc/objdir/stage1-gcc/cc1
> /home/apinski/src/upstream-gcc-git/gcc/gcc/testsuite/gcc.dg/Wstringop-
> overread-6.c
> 
> ....
> (gdb) p debug_generic_expr(expr)
> strlen ((const char *) &arr + 4)

Here is the reduced testcase:
const char arr[7] = "abc\0def";
int warn_strlen (void)
{
  return __builtin_strlen (arr+4);
}

Reply via email to