From patchwork Fri Feb 22 19:14:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: C++ PATCH for c++/56377 (missing template binding in diagnostic context) Date: Fri, 22 Feb 2013 09:14:55 -0000 From: Jason Merrill X-Patchwork-Id: 222676 Message-Id: <5127C3AF.8040804@redhat.com> To: gcc-patches List When we go to tsubst with explicit_args, we should put them in the tinst level. Tested x86_64-pc-linux-gnu, applying to trunk. commit 2eb09da9c9e09ce1e08b024b60594ed4acf02d00 Author: Jason Merrill Date: Fri Feb 22 10:58:47 2013 -0500 PR c++/56377 * pt.c (fn_type_unification): Use explicit args in template instantiation context. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 440df1e..a39d114 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15008,8 +15008,10 @@ fn_type_unification (tree fn, processing_template_decl += incomplete; input_location = DECL_SOURCE_LOCATION (fn); + TREE_VALUE (tinst) = explicit_targs; fntype = tsubst (TREE_TYPE (fn), explicit_targs, complain | tf_partial, NULL_TREE); + TREE_VALUE (tinst) = targs; input_location = loc; processing_template_decl -= incomplete;