[Issue 5845] Regression(2.041) [CTFE] "stack overflow" with recursive ref argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 17 14:08:26 PDT 2011


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au
            Summary|[CTFE] "stack overflow"     |Regression(2.041) [CTFE]
                   |with ref ulong argument +   |"stack overflow" with
                   |CTFE benchmark              |recursive ref argument


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-05-17 14:04:11 PDT ---
This is not useful as a benchmark.
Reduced test case:

void test5845(ulong cols) {}

uint solve(bool niv, ref ulong cols) {
    if (niv)
        solve(false, cols);
    else
        test5845(cols);
    return 65;
}

ulong nqueen(int n) {
    ulong cols    = 0;
    return solve(true, cols);
}

static assert(nqueen(2) == 65);

-- 
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