See http://gcc.gnu.org/ml/gcc-patches/2007-09/msg01600.html template<int M, int N> struct pair { int i, j; pair() : i(M), j(N) {} }; template<int... M> struct S { template<int... N> static int foo() throw (pair <M, N>...) { return 1; } }; int bar () { return S<0, 1, 2>::foo<0, 1> (); } ICEs in tsubst_exception_specification, tsubst_pack_expansion can return here either TREE_VEC (handled), error_mark_node (not handled and should be) or TYPE_PACK_EXPANSION (also needs handling). Additionally, tsubst_pack_expansion return value needs checking for error_mark_node rather than assuming it returns TREE_VEC in regenerate_decl_from_template and tsubst_initializer_list.
The regression here is an error recovery issue. Confirmed.
Mark, this is really only an error recovery regression. Can you relook at the current priority? Thanks, Andrew Pinski
Subject: Bug 33509 Author: dgregor Date: Tue Dec 4 20:49:08 2007 New Revision: 130605 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130605 Log: 2007-12-04 Douglas Gregor <doug.gregor@gmail.com> PR c++/33509 * pt.c (tsubst_exception_specification): Handle substitutions into member templates, where tsubst_pack_expansion returns a TYPE_PACK_EXPANSION. 2007-12-04 Douglas Gregor <doug.gregor@gmail.com> PR c++/33509 * g++.dg/cpp0x/variadic-throw.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
Fixed on mainline