This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2006 21:07:49 -0000
- Subject: [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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