PR middle-end/89934 - ICE on a call with fewer arguments to strncpy declared without...
authorMartin Sebor <msebor@redhat.com>
Thu, 4 Apr 2019 21:59:49 +0000 (21:59 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 4 Apr 2019 21:59:49 +0000 (15:59 -0600)
commit9a0cbb60d28042893135cee60ad28a48a7e2235d
tree5ad4a9c490283deb44de2794ef29ca75d5fe31db
parentc2457887ea0c4796b43625149a8d083266efba86
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.

From-SVN: r270152
gcc/ChangeLog
gcc/gimple-ssa-warn-restrict.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wrestrict-19.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wrestrict-5.c