From: jason Date: Tue, 18 Nov 2014 14:36:48 +0000 (+0000) Subject: * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b893667c0aa51317cfc25c965bf248ec84bc0107;p=thirdparty%2Fgcc.git * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217716 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1afd3cfa46a6..117355975fa2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2014-11-18 Jason Merrill + * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. + PR c++/58102 * typeck2.c (store_init_value): Set it. * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c0f3b8c5f9f2..6661325aa496 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15856,8 +15856,8 @@ instantiate_template_1 (tree tmpl, tree orig_args, tsubst_flags_t complain) ++processing_template_decl; if (DECL_CLASS_SCOPE_P (gen_tmpl)) { - tree ctx = tsubst (DECL_CONTEXT (gen_tmpl), targ_ptr, - complain, gen_tmpl); + tree ctx = tsubst_aggr_type (DECL_CONTEXT (gen_tmpl), targ_ptr, + complain, gen_tmpl, true); push_nested_class (ctx); } /* Substitute template parameters to obtain the specialization. */