This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25309] New: ICE on initialization of a huge array
- From: "jens dot teubner at in dot tum dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2005 12:57:50 -0000
- Subject: [Bug c/25309] New: ICE on initialization of a huge array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC throws an internal compiler error when compiling the following
C99 code (gcc -std=c99 -c):
static char * name[] = {
[0x80000000] = "bar"
};
(GCC reports `internal compiler error: in tree_low_cst, at tree.c:3318'.)
I realize that the above code is quite stupid, as I request the compiler
to create an array of huge size. However, I think GCC should not throw
an internal compiler error. For smaller values of the array index, GCC
correctly reports `error: size of variable 'name' is too large'.
I have reproduced the problem with GCC 3.4.4 (Gentoo Linux) and GCC
3.3.5 (SuSE 9.3), both on Intel Pentium M.
--
Summary: ICE on initialization of a huge array
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jens dot teubner at in dot tum dot de
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25309