Bug 10163 – struct with static void array member without initializer causes ICE

Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-24T08:05:00Z
Last change time
2014-06-01T19:13:04Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
jakobovrum

Comments

Comment #0 by jakobovrum — 2013-05-24T08:05:28Z
Code: ---- struct S { void[1] arr; } ---- The array size does not matter. Output (DMD 2.063 beta): ---- Error: void does not have a default initializer Internal error: ..\ztc\dt.c 106 ---- The error seems to be correct (though badly worded) but sorely needs line information. Adding an `= void` or similar initializer (correctly) makes it work. The ICE is a regression and does not occur in 2.062.
Comment #1 by k.hara.pg — 2013-05-27T06:00:43Z
The code had not been accepted, so I think this is not a blocker regression against 2.063 release. Change the importance.
Comment #2 by jakobovrum — 2013-05-27T06:02:45Z
(In reply to comment #1) > The code had not been accepted, so I think this is not a blocker regression > against 2.063 release. > Change the importance. Of course, my bad.
Comment #3 by henning — 2013-06-09T10:44:05Z
Comment #4 by mk — 2013-10-22T18:04:57Z
*** Issue 11318 has been marked as a duplicate of this issue. ***
Comment #5 by bugzilla — 2014-06-01T19:13:04Z
With 2.066, the code compiles successfully, and void typed data is initialized to 0.