PR tree-optimization/83603 - ICE in builtin_memref at gcc/gimple-ssa-warn-restrict...
authorMartin Sebor <msebor@redhat.com>
Wed, 3 Jan 2018 22:52:53 +0000 (22:52 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 3 Jan 2018 22:52:53 +0000 (15:52 -0700)
commit2438cb6a1dd5f983314b21988b915699c01a2e28
tree9280aa5f66193767d229621d884a9c4551d8b7c4
parentc3a8f964ab330d8e64bb4d33c462c64f4fa35aeb
PR tree-optimization/83603 - ICE in builtin_memref at gcc/gimple-ssa-warn-restrict.c:238

gcc/ChangeLog:

PR tree-optimization/83603
* calls.c (maybe_warn_nonstring_arg): Avoid accessing function
arguments past the endof the argument list in functions declared
without a prototype.
* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
Avoid checking when arguments are null.

gcc/testsuite/ChangeLog:

PR tree-optimization/83603
* gcc.dg/Wrestrict-4.c: New test.

From-SVN: r256217
gcc/ChangeLog
gcc/calls.c
gcc/gimple-ssa-warn-restrict.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wrestrict-4.c [new file with mode: 0644]