This might be related to #35828, but I don't have time to check their sample code. But don't flame me, I have already spent some productive time and managed to strip 2000+ lines of code into only 13. g++ -std=c++0x bug.cc GNU C++ (GCC) version 4.4.0 20081124 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.4.0 20081124 (experimental), GMP version 4.2.2, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: e8678982a640502ce11e7866db86e867 bug.cc: In instantiation of ‘problem<Bar<Foo<int>, Foo<> >, Bar<Foo<int>, Foo<> > >’: bug.cc:20: instantiated from here bug.cc:14: internal compiler error: in finish_member_declaration, at cp/semantics.c:2335
Created attachment 16776 [details] test case
Confirmed.
*** Bug 36413 has been marked as a duplicate of this bug. ***
Even shorter testcase: ===================================================================== template<typename...> struct A; template<typename, typename> struct B; template<typename... T, typename... U> struct B<A<T...>, A<U...> > { static int i; }; B<A<>, A<int> > b1; B<A<int>, A<> > b2; =====================================================================
Subject: Bug 38276 Author: jason Date: Wed Jan 7 20:43:01 2009 New Revision: 143166 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143166 Log: PR c++/35297 PR c++/35477 PR c++/35784 PR c++/36846 PR c++/38276 * pt.c (check_default_tmpl_args): Don't complain about out-of-order parameter packs in the enclosing class or parameter packs after default args. (coerce_template_parms): If we have more than one parameter pack, don't flatten argument packs. (template_args_equal): Handle argument packs. (comp_template_args): Don't flatten argument packs. (check_instantiated_arg): Split out from... (check_instantiated_args): Here. Handle arg packs. (convert_template_argument): Just check that nontype argument packs have the right type. Added: trunk/gcc/testsuite/g++.dg/cpp0x/variadic92.C trunk/gcc/testsuite/g++.dg/cpp0x/variadic93.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/variadic65.C trunk/gcc/testsuite/g++.dg/cpp0x/variadic82.C trunk/gcc/testsuite/g++.dg/cpp0x/variadic83.C
Fixed.