Re: [PATCH] handle non-constant character assignments in strlen (PR 86083)

2018-06-11 Thread Jeff Law
On 06/11/2018 12:06 PM, Martin Sebor wrote: > On 06/11/2018 01:20 AM, Marc Glisse wrote: >> On Sun, 10 Jun 2018, Martin Sebor wrote: >> >>> The attached patch implements this idea.  (I looked for a simple >>> function that returns true/false based on whether a SSA_NAME is >>> or isn't definitely no

Re: [PATCH] handle non-constant character assignments in strlen (PR 86083)

2018-06-11 Thread Martin Sebor
On 06/11/2018 01:20 AM, Marc Glisse wrote: On Sun, 10 Jun 2018, Martin Sebor wrote: The attached patch implements this idea. (I looked for a simple function that returns true/false based on whether a SSA_NAME is or isn't definitely non-zero but couldn't find one so I created one though it seem

Re: [PATCH] handle non-constant character assignments in strlen (PR 86083)

2018-06-11 Thread Marc Glisse
On Sun, 10 Jun 2018, Martin Sebor wrote: The attached patch implements this idea. (I looked for a simple function that returns true/false based on whether a SSA_NAME is or isn't definitely non-zero but couldn't find one so I created one though it seems that extending one of the existing functio

[PATCH] handle non-constant character assignments in strlen (PR 86083)

2018-06-10 Thread Martin Sebor
In the long resolved pr57230 I came across a discussion of an enhancement to the strlen pass to also handle non-const char assignments into the middle of known strings, in addition to assignments where the stored value is known. Storing non-nul into the middle of a string of known length means th