Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-31 Thread Ollie Wild
On Fri, Aug 31, 2012 at 10:37 AM, Jason Merrill wrote: > OK, sorry for the delay. No worries. Thanks. Submitted to trunk and gcc-4_7-branch as r190834 and r190839. Ollie

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-31 Thread Jason Merrill
OK, sorry for the delay. Jason

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-28 Thread Ollie Wild
On Mon, Aug 20, 2012 at 9:58 AM, Ollie Wild wrote: > > Jason, any idea when you can look at this? > > The patch is about as short as they come, so it shouldn't take long to > review. Ping?

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-20 Thread Ollie Wild
On Thu, Aug 16, 2012 at 2:13 PM, Gabriel Dos Reis wrote: > > On Wed, Aug 15, 2012 at 9:52 AM, Ollie Wild wrote: > > (Adding other C++ maintainers in case someone else wants to have a > > stab.) > > > > Ping? > > I consider Jason to be the expert on this; so let see what he says. > > -- Gaby Jaso

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-16 Thread Gabriel Dos Reis
On Wed, Aug 15, 2012 at 9:52 AM, Ollie Wild wrote: > (Adding other C++ maintainers in case someone else wants to have a stab.) > > Ping? I consider Jason to be the expert on this; so let see what he says. -- Gaby > > Ollie > > > On Mon, Aug 13, 2012 at 4:01 PM, Ollie Wild wrote: >> >> On Mon,

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-16 Thread Ollie Wild
On Thu, Aug 16, 2012 at 12:12 PM, Diego Novillo wrote: > > I wonder if it wouldn't make more sense to iterate until we find the > rightmost element in a compound_expr chain, but I don't think they are > neither common nor long enough to matter. Yeah, that was my thinking. I can certainly do what

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-16 Thread Diego Novillo
On Wed, Aug 15, 2012 at 10:52 AM, Ollie Wild wrote: > (Adding other C++ maintainers in case someone else wants to have a stab.) > > Ping? > > Ollie I wonder if it wouldn't make more sense to iterate until we find the rightmost element in a compound_expr chain, but I don't think they are neither c

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-15 Thread Ollie Wild
(Adding other C++ maintainers in case someone else wants to have a stab.) Ping? Ollie On Mon, Aug 13, 2012 at 4:01 PM, Ollie Wild wrote: > > On Mon, Aug 13, 2012 at 3:50 PM, Jakub Jelinek wrote: > > > > The formatting doesn't match GCC coding conventions in several ways. > > You don't have sp

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-13 Thread Ollie Wild
On Mon, Aug 13, 2012 at 3:50 PM, Jakub Jelinek wrote: > > The formatting doesn't match GCC coding conventions in several ways. > You don't have spaces before (, and ( shouldn't be at the end of line if > possible. Updated patch attached. Ollie commit d023097c555a6f7cb84685fd7befedb550889d2c Auth

Re: C++ PR 54197: lifetime of reference not properly extended

2012-08-13 Thread Jakub Jelinek
On Mon, Aug 13, 2012 at 03:47:43PM -0500, Ollie Wild wrote: > diff --git a/gcc/cp/call.c b/gcc/cp/call.c > index 5345f2b..b2fac16 100644 > --- a/gcc/cp/call.c > +++ b/gcc/cp/call.c > @@ -8924,6 +8924,12 @@ extend_ref_init_temps_1 (tree decl, tree init, > VEC(tree,gc) **cleanups) >tree sub = in

C++ PR 54197: lifetime of reference not properly extended

2012-08-13 Thread Ollie Wild
This patch fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54197. Certain constructs (see bug for examples) cause C++ references to be initialized with COMPOUND_EXPR's. The old logic was ignoring these, causing those temporaries to be prematurely destroyed. Tested on trunk via full x86_64 boot