[Issue 13244] New: Wrong code with -inline and foreach/map/all
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 3 00:03:34 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13244
Issue ID: 13244
Summary: Wrong code with -inline and foreach/map/all
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Keywords: wrong-code
Severity: critical
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: thecybershadow at gmail.com
//////////////// test.d ///////////////
import std.algorithm;
import std.range;
void main()
{
auto arr = [[cast(ubyte)1]];
foreach (ref x; arr)
1.iota.map!(c => x[c]).array();
}
///////////////////////////////////////
Running this program results in an access violation when built with -inline.
--
More information about the Digitalmars-d-bugs
mailing list