Bug 2681 – ICE trying to print struct w/ no toString() method.
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-02-21T21:43:00Z
Last change time
2015-06-09T01:21:09Z
Keywords
diagnostic, ice-on-invalid-code
Assigned to
bugzilla
Creator
dsimcha
Comments
Comment #0 by dsimcha — 2009-02-21T21:43:56Z
import std.stdio;
struct Foo {
float num;
}
void main() {
Foo[] fooArray;
writeln(fooArray);
}
This code causes the compiler to core dump without displaying its expected error messages. Marking as major because this is the kind of thing that can be very frustrating for a user to debug.
Also possibly of interest is that changing the type of fooArray from Foo[] to Foo makes the compiler segfault _after_ displaying its error message.
Comment #1 by clugdbug — 2009-04-21T02:38:08Z
This no longer segfaults for me in D2.029. I suspect this is a duplicate of 2203 which was fixed in 2.028. Please confirm.