https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89543
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #5) > (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); > } fold_builtin_strlen->warn_string_no_nul->suppress_warning->set_no_warning_bit (expr, supp); Which then sets the bit. No longer working on this. But at least I recorded where one of the TREE_NO_WARNING flag is set these days.