re PR c/83448 (ice in get_source_location_for_substring, at input.c:1507)
authorJakub Jelinek <jakub@redhat.com>
Thu, 21 Dec 2017 23:09:14 +0000 (00:09 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 21 Dec 2017 23:09:14 +0000 (00:09 +0100)
commit36367d1f19e2a61bd05b292df8f27aab4c03ba72
tree34152cd9bf0ba05802d8679649d10651b48d7274
parent2428b0351bc07f2c14c299022bdae4bf01722031
re PR c/83448 (ice in get_source_location_for_substring, at input.c:1507)

PR c/83448
* gimple-ssa-sprintf.c (maybe_warn): Don't call set_caret_index
if navail is >= dir.len.

* gcc.c-torture/compile/pr83448.c: New test.
* gcc.dg/tree-ssa/builtin-snprintf-warn-4.c: New test.

From-SVN: r255960
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr83448.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-4.c [new file with mode: 0644]