PR tree-optimization/83603 - ICE in builtin_memref at gcc/gimple-ssa-warn-restrict...
commit625c5395ad08a21792335a77dd895c9611cad539
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Jan 2018 22:52:53 +0000 (3 22:52 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Jan 2018 22:52:53 +0000 (3 22:52 +0000)
tree9280aa5f66193767d229621d884a9c4551d8b7c4
parent33fe23796c0cc31ee121eb8aebdcefc4032866de
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256217 138bc75d-0d04-0410-961f-82ee72b054a4
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]