From: Jason Merrill Date: Tue, 8 Mar 2011 22:40:50 +0000 (-0500) Subject: re PR c++/47289 ([C++0x] ICE in tsubst_pack_expansion (triggered by decltype)) X-Git-Tag: releases/gcc-4.4.6~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37b663a4b7ae33e18a864d21d499c9faa7588ebd;p=thirdparty%2Fgcc.git re PR c++/47289 ([C++0x] ICE in tsubst_pack_expansion (triggered by decltype)) PR c++/47289 * pt.c (coerce_template_parms): Fix error recovery. From-SVN: r170797 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a13ced9edb6a..fb0f7037a6d4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Jason Merrill + + PR c++/47289 + * pt.c (coerce_template_parms): Fix error recovery. + 2011-03-08 Dodji Seketeli * name-lookup.c (binding_to_template_parms_of_scope_p): Only diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cd74d28aa909..6b3bc5a5c69e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5452,7 +5452,7 @@ coerce_template_parms (tree parms, sorry ("cannot expand %<%T%> into a fixed-length " "argument list", arg); } - return error_mark_node; + ++lost; } } else if (require_all_args) @@ -5473,7 +5473,7 @@ coerce_template_parms (tree parms, reported) that we are trying to recover from, e.g., a class template with a parameter list such as template. */ - return error_mark_node; + ++lost; else arg = convert_template_argument (TREE_VALUE (parm), arg, new_args, complain, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b73c4a4cea25..93ca90981454 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-03-08 Jason Merrill + + * g++.dg/cpp0x/variadic105.C: New. + 2011-03-08 Dodji Seketeli * g++.dg/lookup/template3.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic105.C b/gcc/testsuite/g++.dg/cpp0x/variadic105.C new file mode 100644 index 000000000000..24d7e15be2f2 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic105.C @@ -0,0 +1,24 @@ +// PR c++/47289 +// { dg-options -std=c++0x } +// { dg-prune-output "note" } + +template