aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2010-10-26 15:45:55 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-26 15:45:55 -0400
commit859b9bfa86424f77efc86bb866cd0dace8148361 (patch)
tree717e9ed28a74bf69b1e0d933392c4d5f81f44e63
parent33ede059c0af34e0fa9f44ed805a55e65243dc37 (diff)
downloadgcc-859b9bfa86424f77efc86bb866cd0dace8148361.zip
gcc-859b9bfa86424f77efc86bb866cd0dace8148361.tar.gz
gcc-859b9bfa86424f77efc86bb866cd0dace8148361.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c18
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/template/arg8.C12
4 files changed, 7 insertions, 30 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c0da1fa..94acfbc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -9,9 +9,6 @@
(cp_gimplify_expr): Handle array default-initialization via
VEC_INIT_EXPR.
- * pt.c (lookup_template_class): push_tinst_level around call to
- coerce_template_parms.
-
* tree.c (stabilize_expr): Handle xvalues properly.
* call.c (build_over_call): Use argarray[0] for 'this' argument.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f150d8f..1de5d55 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6595,17 +6595,13 @@ lookup_template_class (tree d1,
arglist = bound_args;
}
else
- {
- push_tinst_level (templ);
- arglist
- = coerce_template_parms (INNERMOST_TEMPLATE_PARMS (parmlist),
- INNERMOST_TEMPLATE_ARGS (arglist),
- gen_tmpl,
- complain,
- /*require_all_args=*/true,
- /*use_default_args=*/true);
- pop_tinst_level ();
- }
+ arglist
+ = coerce_template_parms (INNERMOST_TEMPLATE_PARMS (parmlist),
+ INNERMOST_TEMPLATE_ARGS (arglist),
+ gen_tmpl,
+ complain,
+ /*require_all_args=*/true,
+ /*use_default_args=*/true);
if (arglist == error_mark_node)
/* We were unable to bind the arguments. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cca9e74..96e557f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -4,10 +4,6 @@
* gfortran.dg/namelist_66.f90: New test.
* 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>
PR fortran/42647
diff --git a/gcc/testsuite/g++.dg/template/arg8.C b/gcc/testsuite/g++.dg/template/arg8.C
deleted file mode 100644
index 5b3a31c..0000000
--- a/gcc/testsuite/g++.dg/template/arg8.C
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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 }