The following code snippet causes an ICE on mainline: ================================== template<int> struct A { template<int N> int A<N>::i; }; ==================================
bug.cc:3: error: type 'A<N>' is not derived from type 'A<<anonymous> >' bug.cc:3: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] According to Phil's regression hunter the regression was introduced in August: : Search converges between 2004-08-04-trunk (#504) and 2004-08-05-trunk (#505). -- Summary: [4.0 regression] ICE on invalid template member declaration 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=18586