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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Tue Mar 19 17:45:34 2019
New Revision: 269807

URL: https://gcc.gnu.org/viewcvs?rev=269807&root=gcc&view=rev
Log:
PR tree-optimization/89644 - False-positive -Warray-bounds diagnostic on
strncpy

gcc/ChangeLog:

        PR tree-optimization/89644
        * tree-ssa-strlen.c (handle_builtin_stxncpy): Consider unterminated
        arrays in determining sequence sizes in strncpy and stpncpy.

gcc/testsuite/ChangeLog:

        PR tree-optimization/89644
        * gcc.dg/Wstringop-truncation-8.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/Wstringop-truncation-8.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-strlen.c

Reply via email to