re PR tree-optimization/84238 (ICE tree check: expected integer_cst, have plus_expr...
authorMarek Polacek <polacek@redhat.com>
Thu, 8 Feb 2018 16:18:04 +0000 (16:18 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 8 Feb 2018 16:18:04 +0000 (16:18 +0000)
commitc6ba596b58e458391ed015e26b763e72ec725600
treedb118338713f091c7af541415bf7da87e6a40dea
parenta4296998322d3bb3b53c7412715cc2169f1d4f61
re PR tree-optimization/84238 (ICE tree check: expected integer_cst, have plus_expr in to_wide, at tree.h:5527)

PR tree-optimization/84238
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
get_range_strlen.

* gcc.dg/Wstringop-overflow-3.c: New test.

From-SVN: r257497
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstringop-overflow-3.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c