From 1039b4437fd64e42c2c224978d34138d5c196a88 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 30 Jun 2006 14:30:28 -0400 Subject: [PATCH] re PR c++/27424 (Valid template-template-parameter rejected) PR c++/27424 * pt.c (convert_template_argument): Pass all template arguments on to coerce_template_template_parms. From-SVN: r115096 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/pt.c | 5 +---- gcc/testsuite/g++.dg/template/ttp20.C | 11 +++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/g++.dg/template/ttp20.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f9b4ab372898..997bb1c1ef32 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-06-28 Jason Merrill + + PR c++/27424 + * pt.c (convert_template_argument): Pass all template arguments + on to coerce_template_template_parms. + 2006-06-25 Lee Millward PR c++/27821 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 18c345383cec..7fe9f124e125 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3794,11 +3794,8 @@ convert_template_argument (tree parm, tree in_decl) { tree val; - tree inner_args; int is_type, requires_type, is_tmpl_type, requires_tmpl_type; - inner_args = INNERMOST_TEMPLATE_ARGS (args); - if (TREE_CODE (arg) == TREE_LIST && TREE_CODE (TREE_VALUE (arg)) == OFFSET_REF) { @@ -3890,7 +3887,7 @@ convert_template_argument (tree parm, if (coerce_template_template_parms (parmparm, argparm, complain, in_decl, - inner_args)) + args)) { val = arg; diff --git a/gcc/testsuite/g++.dg/template/ttp20.C b/gcc/testsuite/g++.dg/template/ttp20.C new file mode 100644 index 000000000000..0d1784c9f82c --- /dev/null +++ b/gcc/testsuite/g++.dg/template/ttp20.C @@ -0,0 +1,11 @@ +// PR c++/27424 +// Bug: failing to substitute the 'int' into C + +template struct A +{ + template class> struct B {}; + template struct C; + B b; +}; + +A a; -- 2.47.2