https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84767
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Jun 22 20:33:38 2018 New Revision: 261916 URL: https://gcc.gnu.org/viewcvs?rev=261916&root=gcc&view=rev Log: Backported from mainline 2018-03-09 Jakub Jelinek <ja...@redhat.com> PR c++/84767 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped decl, use remap_type if we want to use the type. * g++.dg/ext/vla18.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/ext/vla18.C Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/tree-inline.c