This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an 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: 22 May 2006 13:34:49 -0000
- Subject: [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The C++ frontend crashes since GCC 4.0.3 on the following invalid code
snippet:
=================================
void foo()
{
const int x[] = 0;
++x;
}
=================================
bug.cc: In function 'void foo()':
bug.cc:3: error: initializer fails to determine size of 'x'
bug.cc:3: error: cannot convert 'int' to 'const int [1]' in initialization
bug.cc:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in get_unwidened, at tree.c:5322
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1/4.2 regression] ICE incrementing an array
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=27722