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



--- Comment #3 from nfx...@gmail.com 2010-05-07 06:00:12 PDT ---
In dmd 1.060, the example above doesn't crash anymore, but this does:
------- x.d
template Tuple(T...) {
    alias T Tuple;
}

template Repeat(int count) {
    static if (!count) {
        alias Tuple!() Repeat;
    } else {
        alias Tuple!(count-1, Repeat!(count-1)) Repeat;
    }
}

void sometemplate(int T)() {
    foreach (x; Repeat!(320)) {
        sometemplate!(T)();
    }
}

void main() {
    foreach (x; Repeat!(498)) {
        sometemplate!(x)();
    }
}
-------
wine dmd x.d -g

Unexpected OPTLINK Termination at EIP=0041338F

EAX=0200000A EBX=0200000A ECX=00000000 EDX=65D474DD
ESI=0033FE7C EDI=65D474DD EBP=0033FED4 ESP=0033FD60
First=00402000

There's lots of similarities in the test case and register dump, so I suppose
it's the same bug.

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

Reply via email to