Re: [PATCH] tree-ssa-strlen: Fix pdata->maxlen computation [PR110603]

2024-01-29 Thread Richard Biener
On Mon, 29 Jan 2024, Jakub Jelinek wrote: > Hi! > > On the following testcase we emit an invalid range of [2, 1] due to > UB in the source. Older VRP code silently swapped the boundaries and > made [1, 2] range out of it, but newer code just ICEs on it. > > The reason for pdata->minlen 2 is

[PATCH] tree-ssa-strlen: Fix pdata->maxlen computation [PR110603]

2024-01-29 Thread Jakub Jelinek
Hi! On the following testcase we emit an invalid range of [2, 1] due to UB in the source. Older VRP code silently swapped the boundaries and made [1, 2] range out of it, but newer code just ICEs on it. The reason for pdata->minlen 2 is that we see a memcpy in this case setting both elements of