New: ICE on invalid initializer for multidimensional array
6 answers - 698 bytes -
The following invalid code snippet triggers an ICE since at least GCC 2.95.3: template<intstruct A { int x[1][1]; A() : x((int[1][]){{0}}) {} }; A<0a; 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.]
No.1 | | 129 bytes | |
-- reichelt at gcc dot gnu dot org changed: What |Removed |Added Severity|normal |minor
No.2 | | 85 bytes | |
Comment #1 from reichelt at gcc dot gnu dot org 2006-08-14 08:31 Testing a patch.
No.3 | | 203 bytes | |
Comment #2 from patchapp at dberlin dot org 2006-08-15 00:45 Subject: Bug number PR c++/28711 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is
No.4 | | 118 bytes | |
Comment #3 from pinskia at gcc dot gnu dot org 2006-08-16 05:44 Confirmed, this only ICEs with checking turned on.
No.5 | | 432 bytes | |
Comment #4 from reichelt at gcc dot gnu dot org 2006-08-17 08:02 Subject: Bug 28711
Author: reichelt Date: Thu Aug 17 08:02:39 2006 New Revision: 116210