The following invalid code snippet causes an ICE on mainline: ============================================ template<typename T> friend void T::foo; ============================================
bug.cc:1: error: variable or field 'foo' declared void bug.cc:1: internal compiler error: in is_ancestor, at cp/name-lookup.c:2233 Please submit a full bug report, [etc.] Mark, this is probably (minor) fallout from PR 27102. -- Summary: [4.2 regression] ICE with invalid friend declaration Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27808