https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81420
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Thu May 24 14:28:59 2018 New Revision: 260673 URL: https://gcc.gnu.org/viewcvs?rev=260673&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: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/temp-extend1.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/call.c branches/gcc-8-branch/gcc/cp/class.c