[Bug c++/13015] New: internal compiler error with array initializer
herve at sonicsinc dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 12 01:16:00 GMT 2003
Compile the following with : g++ -c arrayBug.cc
<<<<<<<<<<<<<<<arrayBug.cc>>>>>>>>>>>>>>>
struct dummy {
int i;
const char* c;
};
int main() {
struct dummy zero = { 0, "zero" };
struct dummy one = { 0, "one" };
struct dummy two = { 0, "two" };
// this works
struct dummy *pDumbTable1 = new struct dummy[3] = {
zero,
one,
two
};
// this crashes the compiler
struct dummy *pDumbTable2 = new struct dummy[3] = {
{ 0, "zero"},
{ 1, "one"},
{ 2, "two"}
};
}
--
Summary: internal compiler error with array initializer
Product: gcc
Version: 2.96 (redhat)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: herve at sonicsinc dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-
112.7.2)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13015
More information about the Gcc-bugs
mailing list