PR tree-optimization/87112 - ICE in fold_binary_loc on strnlen of mixed integer types
authorMartin Sebor <msebor@redhat.com>
Tue, 28 Aug 2018 00:10:46 +0000 (00:10 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 28 Aug 2018 00:10:46 +0000 (18:10 -0600)
commit1583124e4fdfa4c60f7cfa4063e3ef47087927ca
tree79a8a2437a23485a87f39f56eb6b737742601de4
parentbdd039843c2df9c7ab1ebcd914a70208aaa14c23
PR tree-optimization/87112 - ICE in fold_binary_loc on strnlen of mixed integer types

gcc/ChangeLog:

PR tree-optimization/87112
* builtins.c (expand_builtin_strnlen): Convert c_strlen result to
the type of the bound argument.

gcc/testsuite/ChangeLog:

PR tree-optimization/87112
* gcc.dg/pr87112.c: New test.

From-SVN: r263900
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87112.c [new file with mode: 0644]