Created attachment 1052
The output of the compiled program
When I compiled the following code with DMD v2.057 with -inline option,
the compiled program aborts in runtime (on Linux 64bit).
When I use regex("h") or regex(" ") instead of regex(" "),
this code works correctly.
issue.d:
----------------------------------------------------
import std.regex;
import std.stdio;
void main() {
foreach(w; splitter("hoge fuga", regex(" "))) {
writeln(w);
writeln(w.length);
}
}
----------------------------------------------------
I attached the output of the compiled program.
Comment #1 by k.hara.pg — 2011-12-14T04:26:02Z
This problem does not occurs in Windows 7 64bit.
Output is:
----
hoge fuga
9
----
Comment #2 by dmitry.olsh — 2012-04-19T10:52:44Z
Can't reproduce with 2.059 on Fedora x86_64.
I tried:
dmd x.d
dmd -inline -O x.d
dmd -m64 -inline -O x.d
dmd -m64 -inline x.d
All work. It's either a problem with your specific setup or it was fixed somewhere between 2.057-2.059.
Comment #3 by github-bugzilla — 2014-05-07T18:21:50Z