[Issue 7107] New: Compiled program aborts when using foreach and	std.regex.splitter
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Dec 14 04:07:23 PST 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7107
           Summary: Compiled program aborts when using foreach and
                    std.regex.splitter
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: ttanjo at gmail.com
--- Comment #0 from Tomoya Tanjo <ttanjo at gmail.com> 2011-12-14 04:07:20 PST ---
Created an attachment (id=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.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list