Re: Fix PR78154

2016-11-23 Thread Richard Biener
On Wed, 23 Nov 2016, Prathamesh Kulkarni wrote: > On 22 November 2016 at 20:23, Richard Biener wrote: > > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > > > >> On 21 November 2016 at 15:34, Richard Biener wrote: > >> > On Fri, 18 Nov 2016, Prathamesh Kulkarni wrote: > >> > > >> >> On 17 Novem

Re: Fix PR78154

2016-11-23 Thread Prathamesh Kulkarni
On 22 November 2016 at 20:23, Richard Biener wrote: > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > >> On 21 November 2016 at 15:34, Richard Biener wrote: >> > On Fri, 18 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 17 November 2016 at 15:24, Richard Biener wrote: >> >> > On Thu, 17 No

Re: Fix PR78154

2016-11-22 Thread Richard Biener
On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > On 21 November 2016 at 15:34, Richard Biener wrote: > > On Fri, 18 Nov 2016, Prathamesh Kulkarni wrote: > > > >> On 17 November 2016 at 15:24, Richard Biener wrote: > >> > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > >> > > >> >> On 17 Novem

Re: Fix PR78154

2016-11-22 Thread Prathamesh Kulkarni
On 21 November 2016 at 15:34, Richard Biener wrote: > On Fri, 18 Nov 2016, Prathamesh Kulkarni wrote: > >> On 17 November 2016 at 15:24, Richard Biener wrote: >> > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 17 November 2016 at 14:21, Richard Biener wrote: >> >> > On Thu, 17 No

Re: Fix PR78154

2016-11-21 Thread Richard Biener
On Fri, 18 Nov 2016, Prathamesh Kulkarni wrote: > On 17 November 2016 at 15:24, Richard Biener wrote: > > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > > > >> On 17 November 2016 at 14:21, Richard Biener wrote: > >> > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > >> > > >> >> Hi Richard,

Re: Fix PR78154

2016-11-18 Thread Prathamesh Kulkarni
On 17 November 2016 at 15:24, Richard Biener wrote: > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > >> On 17 November 2016 at 14:21, Richard Biener wrote: >> > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> Hi Richard, >> >> Following your suggestion in PR78154, the patch checks i

Re: Fix PR78154

2016-11-17 Thread Jeff Law
On 11/17/2016 01:48 AM, Richard Biener wrote: On Wed, 16 Nov 2016, Jeff Law wrote: On 11/16/2016 05:17 PM, Martin Sebor wrote: (I've heard some noise in C++-land about making memcpy(0,0,0) valid, but that may have just been noise) We may have read the same discussion. It would make some t

Re: Fix PR78154

2016-11-17 Thread Richard Biener
On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > On 17 November 2016 at 14:21, Richard Biener wrote: > > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > > > >> Hi Richard, > >> Following your suggestion in PR78154, the patch checks if stmt > >> contains call to memmove (and friends) in gimple_

Re: Fix PR78154

2016-11-17 Thread Prathamesh Kulkarni
On 17 November 2016 at 14:21, Richard Biener wrote: > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > >> Hi Richard, >> Following your suggestion in PR78154, the patch checks if stmt >> contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p >> and returns true in that case. >> >>

Re: Fix PR78154

2016-11-17 Thread Richard Biener
On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > Hi Richard, > Following your suggestion in PR78154, the patch checks if stmt > contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p > and returns true in that case. > > Bootstrapped+tested on x86_64-unknown-linux-gnu. > Cross-test

Re: Fix PR78154

2016-11-17 Thread Richard Biener
On Wed, 16 Nov 2016, Jeff Law wrote: > On 11/16/2016 05:17 PM, Martin Sebor wrote: > > > > > > > (I've heard some noise in C++-land about making memcpy(0,0,0) valid, but > > > that may have just been noise) > > > > We may have read the same discussion. It would make some things > > a little ea

Re: Fix PR78154

2016-11-16 Thread Jeff Law
On 11/16/2016 05:17 PM, Martin Sebor wrote: (I've heard some noise in C++-land about making memcpy(0,0,0) valid, but that may have just been noise) We may have read the same discussion. It would make some things a little easier in C++ (and remove what most people view as yet another unnecess

Re: Fix PR78154

2016-11-16 Thread Martin Sebor
On 11/16/2016 05:17 PM, Martin Sebor wrote: On 11/16/2016 02:21 PM, Marc Glisse wrote: On Wed, 16 Nov 2016, Martin Sebor wrote: On 11/16/2016 11:49 AM, Prathamesh Kulkarni wrote: Hi Richard, Following your suggestion in PR78154, the patch checks if stmt contains call to memmove (and friends)

Re: Fix PR78154

2016-11-16 Thread Martin Sebor
On 11/16/2016 02:21 PM, Marc Glisse wrote: On Wed, 16 Nov 2016, Martin Sebor wrote: On 11/16/2016 11:49 AM, Prathamesh Kulkarni wrote: Hi Richard, Following your suggestion in PR78154, the patch checks if stmt contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p and returns tr

Re: Fix PR78154

2016-11-16 Thread Marc Glisse
On Wed, 16 Nov 2016, Martin Sebor wrote: On 11/16/2016 11:49 AM, Prathamesh Kulkarni wrote: Hi Richard, Following your suggestion in PR78154, the patch checks if stmt contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p and returns true in that case. Nice. I think the list s

Re: Fix PR78154

2016-11-16 Thread Martin Sebor
On 11/16/2016 11:49 AM, Prathamesh Kulkarni wrote: Hi Richard, Following your suggestion in PR78154, the patch checks if stmt contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p and returns true in that case. Nice. I think the list should also include mempcpy, stpcpy, and stp

Re: Fix PR78154

2016-11-16 Thread Jakub Jelinek
On Thu, Nov 17, 2016 at 12:19:37AM +0530, Prathamesh Kulkarni wrote: > --- a/gcc/tree-vrp.c > +++ b/gcc/tree-vrp.c > @@ -1069,6 +1069,34 @@ gimple_assign_nonzero_warnv_p (gimple *stmt, bool > *strict_overflow_p) > } > } > > +/* Return true if STMT is known to contain call to a string-built

Fix PR78154

2016-11-16 Thread Prathamesh Kulkarni
Hi Richard, Following your suggestion in PR78154, the patch checks if stmt contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p and returns true in that case. Bootstrapped+tested on x86_64-unknown-linux-gnu. Cross-testing on arm*-*-*, aarch64*-*-* in progress. Would it be OK to co