From: Jason Merrill Date: Tue, 18 Nov 2014 14:36:48 +0000 (-0500) Subject: * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef768ba35319435af3fcf4171253dd32a6ecc322;p=gcc.git * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. From-SVN: r217716 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1afd3cfa46a..117355975fa 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 c0f3b8c5f9f..6661325aa49 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. */