The following invalid code snippet triggers an ICE on mainline and 4.2 branch:
==================================
struct A
{
int i;
};
template<void> struct B : A
{
B() { this->i; }
};
==================================
bug.cc:6: error: 'void' is not a valid type for a template constant parameter
bug.cc: In constructor 'B<<declaration error> >::B()':
bug.cc:8: internal compiler error: in build_simple_base_path, at cp/class.c:473
Please submit a full bug report, [etc.]
--
Summary: [4.2/4.3 regression] ICE with broken template and
inheritance
Product: gcc
Version: 4.3.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=30299