← Back to index
|
Original Bugzilla link
Bug 18721 – ICE in dmd/cond.d(378) when compiling static foreach with -D
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-04T03:03:54Z
Last change time
2018-06-27T03:30:12Z
Keywords
ice, ice-on-invalid-code
Assigned to
No Owner
Creator
Seb
Comments
Comment #0
by greensunny12 — 2018-04-04T03:03:54Z
From
https://github.com/dlang/phobos/pull/6402
Reduced: > dmd -D --- /// template allSameType() { static foreach (idx; T) enum allSameType ; } --- --- core.exception.AssertError@dmd/cond.d(378): Assertion failure ---------------- ??:? _d_assertp [0x74903d] dmd/cond.d:378 pure nothrow @nogc @safe void dmd.cond.StaticForeach.prepare(dmd.dscope.Scope*).__require() [0x51392f] dmd/cond.d:377 void dmd.cond.StaticForeach.prepare(dmd.dscope.Scope*) [0x5137dc] dmd/attrib.d:1083 _ZN24StaticForeachDeclaration7includeEP5Scope [0x50c2df] dmd/doc.d:1042 _ZN11emitComment11EmitComment5visitEP17AttribDeclaration [0x55811b] dmd/parsetimevisitor.d:75 _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP24StaticForeachDeclaration [0x6437f2] dmd/attrib.d:1143 _ZN24StaticForeachDeclaration6acceptEP7Visitor [0x50c48d] dmd/doc.d:1091 void dmd.doc.emitComment(dmd.dsymbol.Dsymbol, dmd.root.outbuffer.OutBuffer*, dmd.dscope.Scope*) [0x557798] dmd/doc.d:796 void dmd.doc.emitMemberComments(dmd.dsymbol.ScopeDsymbol, dmd.root.outbuffer.OutBuffer*, dmd.dscope.Scope*) [0x55767c] dmd/doc.d:916 _ZN11emitComment11EmitComment4emitEP5ScopeP7DsymbolPKc [0x557c57] dmd/doc.d:960 _ZN11emitComment11EmitComment5visitEP11Declaration [0x557ded] dmd/parsetimevisitor.d:47 _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP16AliasDeclaration [0x643492] dmd/declaration.d:929 _ZN16AliasDeclaration6acceptEP7Visitor [0x535d61] dmd/doc.d:1091 void dmd.doc.emitComment(dmd.dsymbol.Dsymbol, dmd.root.outbuffer.OutBuffer*, dmd.dscope.Scope*) [0x557798] dmd/doc.d:796 void dmd.doc.emitMemberComments(dmd.dsymbol.ScopeDsymbol, dmd.root.outbuffer.OutBuffer*, dmd.dscope.Scope*) [0x55767c] dmd/doc.d:439 _Z10gendocfileP6Module [0x556783] dmd/mars.d:911 int dmd.mars.tryMain(ulong, const(char)**) [0x5f8097] dmd/mars.d:1098 _Dmain [0x5f8d92] ---
Comment #1
by greensunny12 — 2018-04-04T08:26:56Z
A first attempt -
https://github.com/dlang/dmd/pull/8128
Comment #2
by greensunny12 — 2018-06-27T03:30:12Z
This has been fixed and is no longer reproducible.