Re: [PATCH] strlen: Fix handle_builtin_string_cmp [PR96758]

2020-08-25 Thread Richard Biener
On Mon, 24 Aug 2020, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled, because handle_builtin_string_cmp > sees a strncmp call with constant last argument 4, where one of the strings > has an upper bound of 5 bytes (due to it being an array of that size) and > the other has a

[PATCH] strlen: Fix handle_builtin_string_cmp [PR96758]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because handle_builtin_string_cmp sees a strncmp call with constant last argument 4, where one of the strings has an upper bound of 5 bytes (due to it being an array of that size) and the other has a known string length of 1 and the result is used only