[Issue 13251] New: std.array.split gives different results with specific compiler flags
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 3 14:59:54 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13251
Issue ID: 13251
Summary: std.array.split gives different results with specific
compiler flags
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: critical
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: olaa81 at gmail.com
Using dmd 2.066.0-rc1
Test with the following code:
-- splittest.d --
import std.stdio : writeln;
import std.array : split;
void main()
{
writeln("one,two,three".split(","));
}
-- splittest.d --
Compiled with 'rdmd splittest.d' outputs ["one", "two", "three"] as expected.
Compiled with 'rdmd -inline -O splittest.d' outputs ["one,two,three"], an array
with one element instead of three.
It is the combination of the -inline and -O flags that causes the issue, on
their own it works.
Works fine in dmd 2.065.
--
More information about the Digitalmars-d-bugs
mailing list