[Bug c++/81420] When a reference is bound to a member in the base of a temporary, lifetime of the temporary is not extended
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 23 03:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81420
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed May 23 03:52:56 2018
New Revision: 260563
URL: https://gcc.gnu.org/viewcvs?rev=260563&root=gcc&view=rev
Log:
PR c++/81420 - not extending temporary lifetime.
* call.c (extend_ref_init_temps_1): Handle ARRAY_REF.
* class.c (build_base_path): Avoid redundant move of an rvalue.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/temp-extend1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/class.c
More information about the Gcc-bugs
mailing list