The following invalid testcase triggers an ICE since GCC 3.4.0: =============================================== struct A { template<int> void foo(); };
template<int N, void (A::*)() = &A::foo<N> > struct B {}; B<int> b; =============================================== bug.cc:8: error: type/value mismatch at argument 1 in template parameter list for 'template<int N, void (A::* <anonymous>)()> struct B' bug.cc:8: error: expected a constant of type 'int', got 'int' bug.cc:8: internal compiler error: tree check: expected tree_vec, have error_mark in any_dependent_template_arguments_p, at cp/pt.c:12751 Please submit a full bug report, [etc.] Patch on the way. -- Summary: [4.0/4.1/4.2 regression] ICE with invalid template parameter Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27582