re PR middle-end/87099 (internal compiler error: segmentation fault)
authorJakub Jelinek <jakub@redhat.com>
Tue, 28 Aug 2018 11:13:04 +0000 (13:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 28 Aug 2018 11:13:04 +0000 (13:13 +0200)
commit2c8861b7505cdc04377cd125565bb5ccadb29529
tree117cac799728b144f9d3de96b7c75faa7fc88a7a
parent4ec4324d0f2425ad64540d4c4d8d29f8e8077c3d
re PR middle-end/87099 (internal compiler error: segmentation fault)

PR middle-end/87099
* calls.c (maybe_warn_nonstring_arg): Punt early if
warn_stringop_overflow is zero.  Don't call get_range_strlen
on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
Swap comparison operands to have constants on rhs.  Only use
lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
increment lenrng[0].

* gcc.dg/pr87099.c: New test.

From-SVN: r263915
gcc/ChangeLog
gcc/calls.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87099.c [new file with mode: 0644]