Fix PR c++/66786 (ICE with nested lambdas in variable template)
authorPatrick Palka <ppalka@gcc.gnu.org>
Sat, 5 Mar 2016 01:59:04 +0000 (01:59 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Sat, 5 Mar 2016 01:59:04 +0000 (01:59 +0000)
commit7a3a3fadb050d9e49b18d052cfc20191acdf4126
tree254c9fbf70248291f4be405898f6b1b4c374240f
parentb554db5b0390f394bf9b8269c0398da9c8a3cbdb
Fix PR c++/66786 (ICE with nested lambdas in variable template)

gcc/cp/ChangeLog:

PR c++/66786
* pt.c (template_class_depth): Given a lambda type, iterate
into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its
TYPE_CONTEXT.  Given a VAR_DECL, iterate into its
CP_DECL_CONTEXT.

gcc/testsuite/ChangeLog:

PR c++/66786
* g++.dg/cpp1y/var-templ48.C: New test.
* g++.dg/cpp1y/var-templ49.C: New test.

From-SVN: r233997
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/var-templ48.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/var-templ49.C [new file with mode: 0644]