Bug 13251 – std.array.split gives different results with specific compiler flags

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-08-03T21:59:00Z
Last change time
2014-08-06T08:06:28Z
Assigned to
nobody
Creator
olaa81

Comments

Comment #0 by olaa81 — 2014-08-03T21:59:54Z
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.
Comment #1 by peter.alexander.au — 2014-08-03T22:59:46Z
Confirmed on OS X. Increasing status to regression.
Comment #2 by dlang-bugzilla — 2014-08-04T11:44:34Z
Introduced by same pull request as issue 13237, looks like a duplicate.
Comment #3 by sinkuupump — 2014-08-06T08:06:28Z
*** This issue has been marked as a duplicate of issue 13237 ***