https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85259
--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> --- Author: msebor Date: Tue Jun 12 18:05:13 2018 New Revision: 261518 URL: https://gcc.gnu.org/viewcvs?rev=261518&root=gcc&view=rev Log: PR tree-optimization/85259 - Missing -Wstringop-overflow= since r256683 gcc/ChangeLog: PR tree-optimization/85259 * builtins.c (compute_objsize): Handle constant offsets. * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return true iff a warning has been issued. * gimple.h (gimple_nonartificial_location): New function. * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call gimple_nonartificial_location and handle -Wno-system-headers. (handle_builtin_stxncpy): Same. gcc/testsuite/ChangeLog: PR tree-optimization/85259 * gcc.dg/Wstringop-overflow-5.c: New test. * gcc.dg/Wstringop-overflow-6.c: New test. Added: trunk/gcc/testsuite/gcc.dg/Wstringop-overflow-5.c trunk/gcc/testsuite/gcc.dg/Wstringop-overflow-6.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/gimple-ssa-warn-restrict.c trunk/gcc/gimple.h trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-strlen.c