------- Comment #3 from dodji at gcc dot gnu dot org 2009-12-01 00:26 ------- A reduced test case seems to be:
~=~ template<class T> struct A { typedef T I; }; template<class T, int> struct B { typedef T TT; typedef typename TT::I TT_I; typedef A<TT_I> TA; }; template<class T> void foo() { typedef T TT; typedef typename TT::I TT_I; typedef A<TT_I> TA; } int main () { foo<A<int> >(); } ~=~ It ICEs with: test.cc:27:18: instantiated from here test.cc:21:21: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:9823 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42225