I will attach the preprocessed source code. I think the code is valid but I am not sure of that after using delta to cut it down as far as I could.
x.cc:40: internal compiler error: tree check: accessed elt 3 of tree_vec with 2 elts in tsubst, at cp/pt.c:9249 Please submit a full bug report, with preprocessed source if appropriate. -- Summary: C++ ICE in tsubst Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sje at cup dot hp dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39980