[dmd-internals] Don's CTFE overhaul – bug reports?
Don Clugston
dclugston at googlemail.com
Sat Apr 9 22:26:30 PDT 2011
On 10 April 2011 01:48, David Nadlinger <code at klickverbot.at> wrote:
> I was thrilled to see Don's work on CTFE arrays being merged into trunk.
> However, it seems still rather unstable, for example, I am able to ICE DMD
> (current master, 0219a5f) with the following program (latest Phobos,
> 516de1b):
>
> ---
> import std.algorithm;
>
> size_t[] foo() {
> auto indices = new size_t[3];
> makeIndex(["b", "c", "a"], indices);
> return indices;
> }
>
> enum bar = foo();
> ---
>
> The exact error message is: »Assertion failed: ((v2->getValue()->op ==
> TOKarrayliteral || v2->getValue()->op == TOKstring || v2->getValue()->op ==
> TOKassocarrayliteral || v2->getValue()->op == TOKnull)), function
> interpretAssignCommon, file interpret.c, line 2590.«
>
> Don, are bug reports helpful for you at the current stage? In which form do
> you want to receive them?
Yes, that's exactly what I want. I added a lot more asserts to the
code, so it will assert if it hits anything
it can't handle.
This one is a simple bug -- I've just got two tests in the wrong order.
I've pushed a fix to the ctfemem branch.
https://github.com/donc/dmd/commit/f8e9d18d37a845c95a88e9146caf1b51a66b4d55
Walter -- you could use the fork queue to apply this to both D2 and D1.
If more test cases show up I'll do a separate branch.
More information about the dmd-internals
mailing list