The following code snippet causes an ICE since gcc 3.3: ========================== struct A; template A<>::A(); ==========================
ctor.cc:2: error: 'A' is not a template ctor.cc:2: error: explicit qualification in declaration of `A A()' ctor.cc:2: internal compiler error: in lookup_template_function, at cp/pt.c:4245 Please submit a full bug report, [etc.] This is similar to PR 19764 (only with the constructor instead of the destructor), but the failure is in a different position and it's not fixed in mainline. -- Summary: [3.3/3.4/4.0 regression] ICE on explicit instantiation of a non-template constructor 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=19884