The following code snippet causes an ICE on the 4.0 branch and mainline:
================================
template<int N> struct A
{
void foo() throw(int[N]);
};
A<0> a;
================================
bug.cc: In instantiation of 'A<0>':
bug.cc:6: instantiated from here
bug.cc:3: error: creating array with size zero ('0')
bug.cc:3: internal compiler error: tree check: expected tree_list, have
error_mark in comp_except_specs, at cp/typeck.c:835
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1 Regression] ICE on invalid throw in template
Product: gcc
Version: 4.1.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=23191