PR c++/70735 - generic lambda and local static variable
authorJason Merrill <jason@redhat.com>
Mon, 23 May 2016 21:21:18 +0000 (17:21 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 23 May 2016 21:21:18 +0000 (17:21 -0400)
commit9c62c1f364223023698e03e52b3ca3c7cb1cb99b
treec660ce4b1de04232fc91bb3ff74573ae91bf2bd8
parent26d6ae55d88dddc2f2f99d9ac7bf11935307b4ec
PR c++/70735 - generic lambda and local static variable

* pt.c (tsubst_copy): Just return a local variable from
non-template context.  Don't call rest_of_decl_compilation for
duplicated static locals.
(tsubst_decl): Set DECL_CONTEXT of local static from another
function.

From-SVN: r236615
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1y/lambda-generic-static1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/lambda-generic-static2.C [new file with mode: 0644]