http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51370
Bug #: 51370 Summary: [4.6/4.7 Regression] ICE with invalid template parameter Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: reich...@gcc.gnu.org The following code snippet triggers an ICE since GCC 4.6.0: ======================================== struct A { template<typename> void foo() {} }; template<void (A::*)()> struct B {}; template<int> struct C { B<&A::foo<int int> > b; }; C<0> c; ======================================== bug.cc:10:17: error: two or more data types in declaration of 'type name' bug.cc: In instantiation of 'struct C<0>': bug.cc:13:6: required from here bug.cc:10:24: error: 'C<<anonymous> >::b' has incomplete type ' tree check: expected tree_vec, have error_mark in get_innermost_template_args, at cp/pt.c:571 Please submit a full bug report, [etc.] A slightly modified example triggers a similar ICE in a different place: ======================================== struct A { template<typename> void foo() {} }; template<void (A::*)()> struct B {}; template<int> struct C { C(B<&A::foo<int int> >*); }; C<0> c(0); ======================================== bug.cc:10:19: error: two or more data types in declaration of 'type name' bug.cc: In instantiation of 'struct C<0>': bug.cc:13:7: required from here bug.cc:10:25: internal compiler error: tree check: expected tree_vec, have error_mark in cp_tree_equal, at cp/tree.c:2334 Please submit a full bug report, [etc.]