Summary: stack overflow in Expression::apply with cyclic
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE, ice
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-03-26 17:53:04 PDT ---
cat > bug.d << CODE
struct Foo
    void bug()
        // cyclic reference
        tab["A"] = Bar(&this);
        auto pbar = "A" in tab;
        // triggers stack overflow in Expression::apply for hasSideEffect
        auto bar = *pbar;

    Bar[string] tab;

struct Bar
    Foo* foo;
    int val;

int ctfe()
    auto foo = Foo();
    return 0;

enum run = ctfe();


We should probably flag all literal expression during visiting
and either skip them or return a different apply result.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to