The following code snippet causes an ICE since GCC 4.0.0: ==================================== struct A { virtual void* foo() = 1; }; ====================================
bug.cc:3: internal compiler error: in grokfield, at cp/decl2.c:850 Please submit a full bug report, [etc.] A similar code snippet causes an ICE in the same place since GCC 4.1.1: ==================================== struct A { void operator()()() = 1; }; ==================================== bug.cc:3: error: 'operator()' declared as function returning a function bug.cc:3: internal compiler error: in grokfield, at cp/decl2.c:850 Please submit a full bug report, [etc.] The 4.1.1 regression in probably fallout from PR 26122. -- Summary: [4.0/4.1/4.2 regression] ICE with initializers for functions Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org BugsThisDependsOn: 26122 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28506