Re: Teach vrp that THIS pointer and references are non-zero

2015-04-15 Thread Jason Merrill
Yep, looks good. Jason

Re: Teach vrp that THIS pointer and references are non-zero

2015-04-13 Thread Richard Biener
On Mon, 13 Apr 2015, Jan Hubicka wrote: > > On Mon, 13 Apr 2015, Jan Hubicka wrote: > > > > > Hi, > > > with multiple inheritance compiling the testcase bellow, the first call > > > always > > > leads to call with offseted pointer, while the other call results in if > > > conditoinal testing if

Re: Teach vrp that THIS pointer and references are non-zero

2015-04-13 Thread Jan Hubicka
> On Mon, 13 Apr 2015, Jan Hubicka wrote: > > > Hi, > > with multiple inheritance compiling the testcase bellow, the first call > > always > > leads to call with offseted pointer, while the other call results in if > > conditoinal testing if parameter is non-NULL. > > > > This patch teach VRP th

Re: Teach vrp that THIS pointer and references are non-zero

2015-04-13 Thread Richard Biener
On Mon, 13 Apr 2015, Jan Hubicka wrote: > Hi, > with multiple inheritance compiling the testcase bellow, the first call always > leads to call with offseted pointer, while the other call results in if > conditoinal testing if parameter is non-NULL. > > This patch teach VRP that THIS pointers and

Re: Teach vrp that THIS pointer and references are non-zero

2015-04-13 Thread Jakub Jelinek
On Mon, Apr 13, 2015 at 12:12:49PM +0200, Jan Hubicka wrote: > @@ -1216,6 +1227,10 @@ gimple_stmt_nonzero_warnv_p (gimple stmt > && DECL_IS_OPERATOR_NEW (fndecl) > && !TREE_NOTHROW (fndecl)) > return true; > + /* Referneces are alwyas non-NULL. */ Two typos. I'll

Teach vrp that THIS pointer and references are non-zero

2015-04-13 Thread Jan Hubicka
Hi, with multiple inheritance compiling the testcase bellow, the first call always leads to call with offseted pointer, while the other call results in if conditoinal testing if parameter is non-NULL. This patch teach VRP that THIS pointers and references are non-zero. I hope this is true also fo