From: paolo Date: Fri, 11 May 2012 08:22:16 +0000 (+0000) Subject: /cp X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bcc2f92143b7285418699c54a2f197c8f2bfcf0;p=thirdparty%2Fgcc.git /cp 2012-05-11 Paolo Carlini PR c++/53305 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if tsubst_decl returns NULL_TREE. * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle BOUND_TEMPLATE_TEMPLATE_PARM. /testsuite 2012-05-11 Paolo Carlini PR c++/53305 * g++.dg/cpp0x/variadic132.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187396 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 99b1eb5fdf27..dfb3204c18c2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2012-05-11 Paolo Carlini + + PR c++/53305 + * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if + tsubst_decl returns NULL_TREE. + * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle + BOUND_TEMPLATE_TEMPLATE_PARM. + 2012-05-10 Paolo Carlini PR c++/53158 diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 3d10afb837c9..cb7922f04c6a 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -1261,6 +1261,7 @@ pp_cxx_simple_type_specifier (cxx_pretty_printer *pp, tree t) case TEMPLATE_TYPE_PARM: case TEMPLATE_TEMPLATE_PARM: case TEMPLATE_PARM_INDEX: + case BOUND_TEMPLATE_TEMPLATE_PARM: pp_cxx_unqualified_id (pp, t); break; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 08b0ad684eda..a506a8481d00 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12066,7 +12066,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) case PARM_DECL: r = retrieve_local_specialization (t); - if (r == NULL) + if (r == NULL_TREE) { tree c; @@ -12084,6 +12084,8 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) not the following PARM_DECLs that are chained to T. */ c = copy_node (t); r = tsubst_decl (c, args, complain); + if (r == NULL_TREE) + return error_mark_node; /* Give it the template pattern as its context; its true context hasn't been instantiated yet and this is good enough for mangling. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e4e5611683a7..c0ed0e4090f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-05-11 Paolo Carlini + + PR c++/53305 + * g++.dg/cpp0x/variadic132.C: New. + 2012-05-10 Paolo Carlini PR c++/53158 diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic132.C b/gcc/testsuite/g++.dg/cpp0x/variadic132.C new file mode 100644 index 000000000000..f50c7a659f56 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic132.C @@ -0,0 +1,27 @@ +// PR c++/53305 +// { dg-do compile { target c++11 } } + +template struct tuple { }; + +struct funct +{ + template + int operator()(argTs...); +}; + +template class test; + +template