Re: [Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Steve Kargl
On Mon, Oct 21, 2013 at 09:04:22PM +0200, Tobias Burnus wrote: > Steve Kargl wrote: > > On Mon, Oct 21, 2013 at 07:15:07PM +0200, Tobias Burnus wrote: > >> - c->tb = tb; > >> + if (num == 1) > >> + c->tb = tb; > >> + else > >> + { > >> +c->tb = XCNEW (gfc_typebound_proc); (see

Re: [Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Tobias Burnus
Steve Kargl wrote: On Mon, Oct 21, 2013 at 07:15:07PM +0200, Tobias Burnus wrote: - c->tb = tb; + if (num == 1) + c->tb = tb; + else + { + c->tb = XCNEW (gfc_typebound_proc); + c->tb->where = gfc_current_locus; + *c->tb = *tb; I haven't convinc

Re: [Patch, Fortran] PR58803 - Prevent a double-free with proc-pointer components

2013-10-21 Thread Steve Kargl
On Mon, Oct 21, 2013 at 07:15:07PM +0200, Tobias Burnus wrote: > - c->tb = tb; > + if (num == 1) > + c->tb = tb; > + else > + { > + c->tb = XCNEW (gfc_typebound_proc); > + c->tb->where = gfc_current_locus; > + *c->tb = *tb; I haven't convinced myself yet, b