www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2645] New: dmd 0.23 crashes on this (wrong) code

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2645

           Summary: dmd 0.23 crashes on this (wrong) code
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: ace17 free.fr


// The following code causes a segmentation fault.
import std.stdio;
import std.string;

struct S { int a, b; }

invariant S[4] tab;

void f()
{
  int i= 0;
  writefln(tab[i]);
}


-- 
Feb 04 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2645


clugdbug yahoo.com.au changed:

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





Works for me in D2.029. (After changing writefln->writeln(tab[i]);, or to
writefln("%s", tab[i]);
)
I suspect this is a duplicate of the segfault bugs fixed in 2.028/2.029.


-- 
May 06 2009