[Issue 7583] New: [CTFE] Pushing to Token array results in interpreter assert

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 25 06:44:20 PST 2012


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

           Summary: [CTFE] Pushing to Token array results in interpreter
                    assert
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Keywords: CTFE, ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: aneas at gmx.net


--- Comment #0 from aneas at gmx.net 2012-02-25 06:44:17 PST ---
The following code results in a CTFE error. The bad line is "array_of_tuples ~=
Tuple!(int, int)(0, 0);"


import std.typecons;

void function_evaluated_at_compiletime() {
    Tuple!(int, int)[] array_of_tuples;
    array_of_tuples ~= Tuple!(int, int)(0, 0);
}

void main() {
    mixin(function_evaluated_at_compiletime());
}


$ dmd main.d
dmd: interpret.c:94: Expression* CtfeStack::getValue(VarDeclaration*):
Assertion `v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack < stackPointer()'
failed.
Aborted

DMD64 D Compiler v2.058

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