[Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue May 2 12:07:00 GMT 2006
The following invalid code snippet causes an ICE since GCC 4.1.0
(and in GCC 3.3, 3.3.1, 3.3.2):
========================
struct A {};
A a[] = { 0 };
========================
The compiler loops forever until it runs out of memory:
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
[etc.]
--
Summary: [4.1/4.2 regression] ICE with invalid array initializer
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, 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=27385
More information about the Gcc-bugs
mailing list