Compiler output: $ gcc testcase.C testcase.C:2:11: error: type/value mismatch at argument 1 in template parameter list for 'template<class> struct S' testcase.C:2:11: error: expected a type, got '0' testcase.C:2:21: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in grokdeclarator, at cp/decl.c:8797 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
----- testcase.C ----- template < typename > struct S; void (S <0>::*ptr) (); ---------------------- Tested revisions: r164228 - crash r161659 - crash r159696 - OK r158978 - OK 4.5 r163761 - crash 4.5 r158978 - OK 4.4 r160770 - crash 4.4 r154975 - OK -- Summary: [4.4/4.5/4.6 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in grokdeclarator, at cp/decl.c:8797 on invalid code Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45665