http://d.puremagic.com/issues/show_bug.cgi?id=5258

           Summary: [CTFE] Stack overflow with struct by ref
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-11-22 17:09:12 PST ---
This D2 program generates a Stack Overflow with DMD 2.050 despite the stack
dept is very small:


struct Foo { int x; }
void bar(int n, ref Foo f) {
    if (n)
        bar(n - 1, f);
    else
        f.x++;
}
int spam() {
    bar(1, Foo());
    return 0;
}
enum _ = spam();
void main() {}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to