The following invalid code snippet triggers an ICE since GCC 4.4.0: ================================= struct A { static int i; };
template<int> struct B { int x[A::i]; }; ================================= bug.cc:8:13: internal compiler error: tree check: did not expect class 'type', have 'type' (record_type) in contains_placeholder_p, at tree.c:2498 Please submit a full bug report, [etc.] The bug is related to PR28879. -- Summary: [4.4/4.5 Regression] ICE with invalid array bound in template class Product: gcc Version: 4.5.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 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370