https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82076
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- I think the problem in this case is that a) the sanitizers don't instrument calls to built-in functions like memcpy (the reason for the missing runtime error in the case of -DN=3), and b) -Wstringop-overflow doesn't handle MEM_REF (which is what memcpy with a small power-of-2 size is transformed into). Both should be solvable.