www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17451] New: ICE in ddmd/declaration.d(2179)

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

          Issue ID: 17451
           Summary: ICE in ddmd/declaration.d(2179)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

This is a reduced ICE from vibe.d (hence the funky names). It happens with the
latest DMD as of now (v2.075.0-devel-e5ebfc571)

 dmd -c libevent2.d
libevent2.d: --- interface ManualEvent {} interface EventDriver { ManualEvent createManualEvent() ; } struct ArraySet(Key) { ~this() { try allocator; catch false; // should never happen } } struct HashMap(TValue) { alias Value = TValue; static if ({ Value v; }) {} } struct Task {} class Libevent2Driver : EventDriver { Libevent2ManualEvent createManualEvent() {} } struct ThreadSlot { ArraySet!Task tasks; } class Libevent2ManualEvent { HashMap!ThreadSlot m_waiters; } --- core.exception.AssertError ddmd/declaration.d(2179): Assertion failure ---------------- ??:? _d_assertp [0x713ac4] ??:? _ZN14VarDeclaration13callScopeDtorEP5Scope [0x53349b] ??:? _ZN14VarDeclaration8semanticEP5Scope [0x53294d] ??:? _ZN14DeclarationExp8semanticEP5Scope [0x589323] ??:? _ZN24StatementSemanticVisitor5visitEP12ExpStatement [0x6150cb] ??:? _ZN12ExpStatement6acceptEP7Visitor [0x60a5a1] ??:? ddmd.statement.Statement ddmd.statementsem.semantic(ddmd.statement.Statement, ddmd.dscope.Scope*) [0x6229b6] ??:? _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0x615361] ??:? _ZN17CompoundStatement6acceptEP7Visitor [0x60acf1] ??:? ddmd.statement.Statement ddmd.statementsem.semantic(ddmd.statement.Statement, ddmd.dscope.Scope*) [0x6229b6] ??:? _ZN15FuncDeclaration9semantic3EP5Scope [0x5a8b8e] ??:? _ZN7FuncExp8semanticEP5Scope [0x5884e2] ??:? bool ddmd.staticcond.evalStaticCondition(ddmd.dscope.Scope*, ddmd.expression.Expression, ddmd.expression.Expression, ref bool) [0x62302a] ??:? _ZN17StaticIfCondition7includeEP5ScopeP12ScopeDsymbol [0x50cf20] ??:? _ZN22ConditionalDeclaration7includeEP5ScopeP12ScopeDsymbol [0x504ed1] ??:? _ZN19StaticIfDeclaration7includeEP5ScopeP12ScopeDsymbol [0x505121] ??:? _ZN17AttribDeclaration8semanticEP5Scope [0x502896] ??:? _ZN19StaticIfDeclaration8semanticEP5Scope [0x505224] ??:? _ZN17StructDeclaration8semanticEP5Scope [0x55bec7] ??:? _ZN16TemplateInstance13expandMembersEP5Scope [0x572ccd] ??:? _ZN16TemplateInstance16tryExpandMembersEP5Scope [0x572d3e] ??:? _ZN16TemplateInstance8semanticEP5ScopeP5ArrayIP10ExpressionE [0x56ea15] ??:? _ZN16TemplateInstance8semanticEP5Scope [0x56f14b] ??:? _ZN12TypeInstance7resolveE3LocP5ScopePP10ExpressionPP4TypePP7Dsymbolb [0x5e1db5] ??:? _ZN12TypeInstance8semanticE3LocP5Scope [0x5e1e9f] ??:? _ZN14VarDeclaration8semanticEP5Scope [0x530726] ??:? _ZN16ClassDeclaration8semanticEP5Scope [0x52ba15] ??:? _ZN4Type9covariantEPS_Pm [0x5d299c] ??:? _ZN15FuncDeclaration13findVtblIndexEP5ArrayIP7DsymbolEi [0x5abfa4] ??:? _ZN15FuncDeclaration8semanticEP5Scope [0x5a6971] ??:? _ZN16ClassDeclaration8semanticEP5Scope [0x52ba15] ??:? _ZN6Module8semanticEP5Scope [0x551b39] ??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x5d052c] ??:? _Dmain [0x5d1686] ??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFNlZv [0x71570e] ??:? scope void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x715658] ??:? scope void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x7156ca] ??:? scope void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x715658] ??:? _d_run_main [0x7155d6] ??:? main [0x5d1d1b] ??:? __libc_start_main [0xd5961510] --
May 28 2017