The following invalid code snippet causes an ICE on mainline: ============================= template<typename> struct A { int A<0>::* p; }; =============================
bug.cc:3: error: type/value mismatch at argument 1 in template parameter list for 'template<class> struct A' bug.cc:3: error: expected a type, got '0' bug.cc:3: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in build_offset_type, at tree.c:4593 Please submit a full bug report, [etc.] -- Summary: [4.0 regression] ICE on invalid class in pointer-to- 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=19895