www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12836] New: CTFE ICE CompiledCtfeFunction::walkAllVars

https://issues.dlang.org/show_bug.cgi?id=12836

          Issue ID: 12836
           Summary: CTFE ICE CompiledCtfeFunction::walkAllVars
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

This is similar to #12397 and I'd imagine the same fix will apply to both, but
the test case is different enough that it warrants a new issue.

---

immutable C L = 1 << K;

---

Here's the ICE with backtrace.

ctfeice.d:2: error: undefined identifier C
ctfeice.d:2: error: undefined identifier K
cc1d: ../../gcc/d/dfrontend/interpret.c:314: static int
CompiledCtfeFunction::walkAllVars(Expression*, void*): Assertion `0' failed.
cc1d: internal compiler error: Aborted
0xa9f00f crash_signal
    ../../gcc/toplev.c:337
0x606ed4 CompiledCtfeFunction::walkAllVars(Expression*, void*)
    ../../gcc/d/dfrontend/interpret.c:314
0x5862b7 BinExp::apply(int (*)(Expression*, void*), void*)
    ../../gcc/d/dfrontend/apply.c:68
0x609352 CompiledCtfeFunction::onExpression(Expression*)
    ../../gcc/d/dfrontend/interpret.c:298
0x609352 Expression::ctfeInterpret()
    ../../gcc/d/dfrontend/interpret.c:707
0x600dde ExpInitializer::semantic(Scope*, Type*, NeedInterpret)
    ../../gcc/d/dfrontend/init.c:828
0x5bee67 VarDeclaration::semantic(Scope*)
    ../../gcc/d/dfrontend/declaration.c:1489
0x58ac0c AttribDeclaration::semanticNewSc(Scope*, unsigned long, LINK, PROT,
int, unsigned int)
    ../../gcc/d/dfrontend/attrib.c:141
0x58ad38 StorageClassDeclaration::semantic(Scope*)
    ../../gcc/d/dfrontend/attrib.c:462
0x6411ac Module::semantic()
    ../../gcc/d/dfrontend/module.c:744

--
Jun 01 2014