PR tree-optimization/90662 - strlen of a string in a vla plus offset not folded
authorMartin Sebor <msebor@redhat.com>
Fri, 14 Jun 2019 02:07:02 +0000 (02:07 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 14 Jun 2019 02:07:02 +0000 (20:07 -0600)
commitbc09939dad30f42d89f0ee90cad1033fb32edb85
tree4cf3d886c39f8679d0cec4db8581e82d3030d845
parentd4b5b8eaa4227c84b9519336dce3b8c7c5561295
PR tree-optimization/90662 - strlen of a string in a vla plus offset not folded

gcc/ChangeLog:

PR tree-optimization/90662
* tree-ssa-strlen.c (get_stridx): Convert fold_build2 operands
to the same type.

gcc/testsuite/ChangeLog:

PR tree-optimization/90662
* gcc.dg/pr90866-2.c: New test.
* gcc.dg/pr90866.c: Ditto.

From-SVN: r272281
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr90866-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr90866.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c