www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14754] New: [REG2.068b1] 64bit wrong code with -inline

https://issues.dlang.org/show_bug.cgi?id=14754

          Issue ID: 14754
           Summary: [REG2.068b1] 64bit wrong code with -inline
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: jiki red.email.ne.jp

This program crashed when compiled and run with -m64 -inline.
In 2.067, it works.


-----------------------
import std.algorithm;
import std.array;

auto aafunc(string k)
{
    enum aa = [ "K": "V" ];
    auto p = k in aa;
    return  null;
}

auto mapfun(R)(R words, string k)
{
    return words.map!(s=>aafunc(k)).array;
}

void main()
{
    auto r = [""].mapfun("");
}

--
Jun 30 2015