https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86669
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Aug 30 11:20:08 2019 New Revision: 275078 URL: https://gcc.gnu.org/viewcvs?rev=275078&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-7-branch/gcc/testsuite/g++.dg/cpp0x/initlist105.C branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp0x/initlist106.C branches/gcc-7-branch/gcc/testsuite/g++.dg/other/pr86669.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/call.c branches/gcc-7-branch/gcc/testsuite/ChangeLog