Since GCC 3.4.0 we get an ICE for the following code snippet.
Before we correctly issued an error message.
===================================
struct A {};
template<typename T> void foo()
{
T::~T();
}
template void foo<A>();
===================================
bug.cc: In function 'void foo() [with T = A]':
bug.cc:8: instantiated from here
bug.cc:5: internal compiler error: in lookup_member, at cp/search.c:1200
Please submit a full bug report, [etc.]
--
Summary: [3.4/4.0/4.1 regression] ICE on invalid destructor call
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, 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=22180