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

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Thu Apr  4 22:16:11 2019
New Revision: 270153

URL: https://gcc.gnu.org/viewcvs?rev=270153&root=gcc&view=rev
Log:
Backport from 9.0.

PR middle-end/89934 - ICE on a call with fewer arguments to strncpy declared
without prototype

gcc/ChangeLog:

        PR middle-end/89934
        * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Bail
        out if the number of arguments is less than expected.

gcc/testsuite/ChangeLog:

        PR middle-end/89934
        * gcc.dg/Wrestrict-19.c: New test.
        * gcc.dg/Wrestrict-5.c: Add comment.  Remove unused code.


Added:
    branches/gcc-8-branch/gcc/testsuite/gcc.dg/Wrestrict-19.c
Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/gimple-ssa-warn-restrict.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog
    branches/gcc-8-branch/gcc/testsuite/gcc.dg/Wrestrict-5.c

Reply via email to