diff options
author | Jason Merrill <jason@redhat.com> | 2010-08-09 17:13:12 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-08-09 17:13:12 -0400 |
commit | 7a25d520c26a0dc8494f68b680b048e075d53267 (patch) | |
tree | ea7180e4c6a61aab08760f57a456efe90954a18d /gcc/cp | |
parent | ee247636108baa13ae1f5322cb048d7c05a418cc (diff) | |
download | gcc-7a25d520c26a0dc8494f68b680b048e075d53267.zip gcc-7a25d520c26a0dc8494f68b680b048e075d53267.tar.gz gcc-7a25d520c26a0dc8494f68b680b048e075d53267.tar.bz2 |
re PR c++/45236 ([C++0x] Can't access nested type of a partial class specialization involving variadic parameters)
PR c++/45236
* pt.c (lookup_template_class): Don't re-coerce outer parms.
From-SVN: r163042
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6355215..c202af4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-08-09 Jason Merrill <jason@redhat.com> + + PR c++/45236 + * pt.c (lookup_template_class): Don't re-coerce outer parms. + 2010-08-09 Nathan Froyd <froydnj@codesourcery.com> * call.c (add_builtin_candidates): Use VECs for local variable diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index bb6b1a0..02c54f9 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6540,11 +6540,16 @@ lookup_template_class (tree d1, i > 0 && t != NULL_TREE; --i, t = TREE_CHAIN (t)) { - tree a = coerce_template_parms (TREE_VALUE (t), - arglist, gen_tmpl, - complain, - /*require_all_args=*/true, - /*use_default_args=*/true); + tree a; + if (i == saved_depth) + a = coerce_template_parms (TREE_VALUE (t), + arglist, gen_tmpl, + complain, + /*require_all_args=*/true, + /*use_default_args=*/true); + else + /* Outer levels should have already been coerced. */ + a = TMPL_ARGS_LEVEL (arglist, i); /* Don't process further if one of the levels fails. */ if (a == error_mark_node) |