The following invalid code snippet triggers an ICE on mainline: ===================================================== template<int> struct A { static int i; };
template<int N> int A<N>::i(__decltype( A::i )); ===================================================== bug.cc:6: internal compiler error: in finish_decltype_type, at cp/semantics.c:4158 Please submit a full bug report, [etc.] A slightly modified testcase crashes in a different position: ===================================================== template<int> struct A { static int i; }; template<int N> int A<N>::i(__decltype( A::i; ===================================================== bug.cc:6: internal compiler error: in lvalue_p_1, at cp/tree.c:149 Please submit a full bug report, [etc.] -- Summary: [4.3 regression] ICE in invalid initialization of static template member Product: gcc Version: 4.3.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=34271