Re: avoiding recursive calls of calloc due to optimization

2015-09-22 Thread Richard Biener
On Mon, Sep 21, 2015 at 8:17 PM, Marc Glisse wrote: > On Mon, 21 Sep 2015, Daniel Gutson wrote: > >> This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html >> >> Currently, gcc provides an optimization that transforms a call to >> malloc and a call to memset into a call to call

Re: avoiding recursive calls of calloc due to optimization

2015-09-21 Thread Daniel Gutson
On Mon, Sep 21, 2015 at 2:26 PM, Andrew Pinski wrote: > On Mon, Sep 21, 2015 at 10:20 AM, Daniel Gutson > wrote: >> This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html >> >> Currently, gcc provides an optimization that transforms a call to >> malloc and a call to memset int

Re: avoiding recursive calls of calloc due to optimization

2015-09-21 Thread Daniel Gutson
On Mon, Sep 21, 2015 at 3:33 PM, Daniel Gutson wrote: > On Mon, Sep 21, 2015 at 2:26 PM, Andrew Pinski wrote: >> On Mon, Sep 21, 2015 at 10:20 AM, Daniel Gutson >> wrote: >>> This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html >>> >>> Currently, gcc provides an optimizatio

Re: avoiding recursive calls of calloc due to optimization

2015-09-21 Thread Marc Glisse
On Mon, 21 Sep 2015, Daniel Gutson wrote: This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html Currently, gcc provides an optimization that transforms a call to malloc and a call to memset into a call to calloc. This is fine except when it takes place within the calloc() f

Re: avoiding recursive calls of calloc due to optimization

2015-09-21 Thread Jakub Jelinek
On Mon, Sep 21, 2015 at 10:26:23AM -0700, Andrew Pinski wrote: > On Mon, Sep 21, 2015 at 10:20 AM, Daniel Gutson > wrote: > > This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html > > > > Currently, gcc provides an optimization that transforms a call to > > malloc and a call t

Re: avoiding recursive calls of calloc due to optimization

2015-09-21 Thread Andrew Pinski
On Mon, Sep 21, 2015 at 10:20 AM, Daniel Gutson wrote: > This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html > > Currently, gcc provides an optimization that transforms a call to > malloc and a call to memset into a call to calloc. > This is fine except when it takes place w

avoiding recursive calls of calloc due to optimization

2015-09-21 Thread Daniel Gutson
This is derived from https://gcc.gnu.org/ml/gcc-help/2015-03/msg00091.html Currently, gcc provides an optimization that transforms a call to malloc and a call to memset into a call to calloc. This is fine except when it takes place within the calloc() function implementation itself, causing a recu