Re: [PATCH] Fix some bugs in maybe_warn_nonstring_arg (PR middle-end/87099)

2018-08-28 Thread Richard Biener
On Tue, 28 Aug 2018, Jakub Jelinek wrote: > Hi! > > The following patch fixes some bugs in maybe_warn_nonstring_arg. > The testcase ICEs, because lenrng[1] is a PLUS_EXPR, but the code assumes > without checking that it must be INTEGER_CST and feeds it into > tree_int_cst_lt. If the upper bound

[PATCH] Fix some bugs in maybe_warn_nonstring_arg (PR middle-end/87099)

2018-08-28 Thread Jakub Jelinek
Hi! The following patch fixes some bugs in maybe_warn_nonstring_arg. The testcase ICEs, because lenrng[1] is a PLUS_EXPR, but the code assumes without checking that it must be INTEGER_CST and feeds it into tree_int_cst_lt. If the upper bound is NULL or is some expression other than INTEGER_CST,