The following testcase triggers an ICE since GCC 4.0.0:
==========================================
void foo(void (*p)(int n, int x[n])) {}
==========================================
bug.c: In function 'foo':
bug.c:1: internal compiler error: in make_decl_rtl, at varasm.c:1005
Please submit a full bug report, [etc.]
I'm not sure whether the code is invalid as an extension or not.
void bar(int n, int x[n]) {}
is accepted as well as
void foo(void (*p)(int n, int x[n]));
The C++ frontend rejects it, see also
http://gcc.gnu.org/ml/gcc/2006-07/msg00479.html
--
Summary: [4.0/4.1/4.2 regression] ICE with variable sized array
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-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=28504