Commit 859b9bfa by Jason Merrill

revert: pt.c (lookup_template_class): push_tinst_level around call to coerce_template_parms.

Revert
	* pt.c (lookup_template_class): push_tinst_level around call to
	coerce_template_parms.

From-SVN: r165982
parent 33ede059
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
(cp_gimplify_expr): Handle array default-initialization via (cp_gimplify_expr): Handle array default-initialization via
VEC_INIT_EXPR. VEC_INIT_EXPR.
* pt.c (lookup_template_class): push_tinst_level around call to
coerce_template_parms.
* tree.c (stabilize_expr): Handle xvalues properly. * tree.c (stabilize_expr): Handle xvalues properly.
* call.c (build_over_call): Use argarray[0] for 'this' argument. * call.c (build_over_call): Use argarray[0] for 'this' argument.
......
...@@ -6595,17 +6595,13 @@ lookup_template_class (tree d1, ...@@ -6595,17 +6595,13 @@ lookup_template_class (tree d1,
arglist = bound_args; arglist = bound_args;
} }
else else
{ arglist
push_tinst_level (templ); = coerce_template_parms (INNERMOST_TEMPLATE_PARMS (parmlist),
arglist INNERMOST_TEMPLATE_ARGS (arglist),
= coerce_template_parms (INNERMOST_TEMPLATE_PARMS (parmlist), gen_tmpl,
INNERMOST_TEMPLATE_ARGS (arglist), complain,
gen_tmpl, /*require_all_args=*/true,
complain, /*use_default_args=*/true);
/*require_all_args=*/true,
/*use_default_args=*/true);
pop_tinst_level ();
}
if (arglist == error_mark_node) if (arglist == error_mark_node)
/* We were unable to bind the arguments. */ /* We were unable to bind the arguments. */
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
* gfortran.dg/namelist_66.f90: New test. * gfortran.dg/namelist_66.f90: New test.
* gfortran.dg/fmt_t_6.f: Fix whitespace. * gfortran.dg/fmt_t_6.f: Fix whitespace.
2010-10-26 Jason Merrill <jason@redhat.com>
* g++.dg/template/arg8.C: Test for helpful diagnostic.
2010-10-26 Janus Weil <janus@gcc.gnu.org> 2010-10-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/42647 PR fortran/42647
......
// Test for a message indicating what template we're trying to convert
// arguments for. We can't actually test for it directly because it
// doesn't have an associated line number, but we can test for the
// "instantiated from here" message that follows.
template <int I>
struct A { };
int i;
A<i> a; // { dg-message "instantiated from here" }
// { dg-error "not a valid template argument" "" { target *-*-* } 10 }
// { dg-error "invalid type in declaration" "" { target *-*-* } 10 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment