Thread overview
[Issue 2681] New: ICE trying to print struct w/ no toString() method.
Feb 22, 2009
d-bugmail
Apr 21, 2009
d-bugmail
May 02, 2009
d-bugmail
February 22, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2681

           Summary: ICE trying to print struct w/ no toString() method.
           Product: D
           Version: 2.025
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic, ice-on-invalid-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: dsimcha@yahoo.com


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.


-- 

April 21, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2681





------- Comment #1 from clugdbug@yahoo.com.au  2009-04-21 02:38 -------
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.


-- 

May 02, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2681


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from bugzilla@digitalmars.com  2009-05-02 09:59 -------
Works dmd 2.029


--