[Bug c++/28711] New: ICE on invalid initializer for multidimensional array
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Aug 13 21:42:00 GMT 2006
The following invalid code snippet triggers an ICE since at least GCC 2.95.3:
===========================
template<int> struct A
{
int x[1][1];
A() : x((int[1][]){{0}}) {}
};
A<0> a;
===========================
bug.cc: In constructor 'A<<anonymous> >::A()':
bug.cc:4: error: multidimensional array must have bounds for all dimensions
except the first
bug.cc: In constructor 'A<<anonymous> >::A() [with int <anonymous> = 0]':
bug.cc:7: instantiated from here
bug.cc:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in tsubst_copy_and_build, at cp/pt.c:9085
Please submit a full bug report, [etc.]
--
Summary: ICE on invalid initializer for multidimensional 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=28711
More information about the Gcc-bugs
mailing list