PR tree-optimization/87490 - ICE in expand_builtin_strnlen with a constant argument...
authorMartin Sebor <msebor@redhat.com>
Fri, 5 Oct 2018 16:43:11 +0000 (16:43 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 5 Oct 2018 16:43:11 +0000 (10:43 -0600)
commitf343165275ab5a22546f82f75351a876449309a7
tree8f20c275050047b78af765ced840e7a2f5e38a6b
parente0b9bc230ac50c67c63f303b70e72b34a7c516fb
PR tree-optimization/87490 - ICE in expand_builtin_strnlen with a constant argument and non-constant bound

gcc/ChangeLog:

PR tree-optimization/87490
* builtins.c (expand_builtin_strnlen): Handle a null data.decl
consistently.

gcc/testsuite/ChangeLog:

PR tree-optimization/87490
* gcc.dg/pr87490.c: New test.
* gcc.dg/warn-strnlen-no-nul-2.c: Same.

From-SVN: r264876
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87490.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/warn-strnlen-no-nul-2.c [new file with mode: 0644]