This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54197] [4.7/4.8 regression] Lifetime of reference not properly extended


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54197

--- Comment #3 from Ollie Wild <aaw at gcc dot gnu.org> 2012-08-16 18:44:01 UTC ---
Author: aaw
Date: Thu Aug 16 18:43:52 2012
New Revision: 190450

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190450
Log:
Fix some cases where lifetimes of temporaries bound to expressions are not
properly extended (Google ref b/6946758).

2012-08-16  Ollie Wild  <aaw@google.com>

    PR c++/54197
    * gcc/cp/call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
    * gcc/testsuite/g++.dg/init/lifetime3.C: New test.

Added:
    branches/google/gcc-4_7/gcc/testsuite/g++.dg/init/lifetime3.C
Modified:
    branches/google/gcc-4_7/gcc/cp/ChangeLog.google-4_7
    branches/google/gcc-4_7/gcc/cp/call.c
    branches/google/gcc-4_7/gcc/testsuite/ChangeLog.google-4_7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]