https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86669
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Jan 8 10:16:00 2019 New Revision: 267702 URL: https://gcc.gnu.org/viewcvs?rev=267702&root=gcc&view=rev Log: Backported from mainline 2018-12-07 Jakub Jelinek <ja...@redhat.com> PR c++/86669 * call.c (make_temporary_var_for_ref_to_temp): Call pushdecl even for automatic vars. * g++.dg/cpp0x/initlist105.C: New test. * g++.dg/cpp0x/initlist106.C: New test. * g++.dg/other/pr86669.C: New test. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/initlist105.C branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/initlist106.C branches/gcc-8-branch/gcc/testsuite/g++.dg/other/pr86669.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/call.c branches/gcc-8-branch/gcc/testsuite/ChangeLog