[Issue 5595] New: Compiler crash on heavy std.algorithm use

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 16 07:41:56 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5595

           Summary: Compiler crash on heavy std.algorithm use
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2011-02-16 07:39:21 PST ---
The following code crashes the compiler on Windows using the latest beta of
2.052.  It works on 2.051.

import std.algorithm, std.math, std.stdio, std.conv;

// std.datetime isn't used but needs to be imported to reproduce the bug.
import std.datetime;

void invert(double[][] mat) {
    foreach(i, row; mat) {
        double absMax = map!(abs)(row).front;
    }
}

void readExp() {
    auto handle = File("foo.txt");
    auto lines = handle.byLine();
    auto ls = lines.front().splitter('\t');
    if(!ls.empty) {
        auto floats = map!(to!float)(ls).front;
    }
}

void main(string[] args) {}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list