The following invalid code causes an ICE on mainline: ============================= typedef int X; template<X> struct X {}; =============================
bug.cc:2: error: 'template<int <anonymous> > struct X' redeclared as different kind of symbol bug.cc:1: error: previous declaration of 'typedef int X' bug.cc:2: internal compiler error: tree check: expected class 'declaration', have 'exceptional' (error_mark) in push_template_decl_real, at cp/pt.c:3152 Please submit a full bug report, [etc.] -- Summary: [4.0 regression] ICE on invalid template class Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18471