← Back to index
|
Original Bugzilla link
Bug 17660 – ICE with `static foreach`: AssertError@ddmd/visitor.d(39)
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-07-17T19:19:35Z
Last change time
2017-08-16T13:23:47Z
Keywords
ice
Assigned to
No Owner
Creator
ag0aep6g
Comments
Comment #0
by ag0aep6g — 2017-07-17T19:19:35Z
test.d: ---- template AliasSeq(stuff ...) { alias AliasSeq = stuff; } auto append() { static foreach (i; AliasSeq!(1)) {} int result; return result; } ---- `dmd -c test.d`: ---- core.exception.AssertError@ddmd/visitor.d(39): Assertion failure ---------------- ??:? _d_assertp [0x8098cf09] ??:? _ZN7Visitor5visitEP9Statement [0x8089b5f8] ??:? _ZN7Visitor5visitEP19ForwardingStatement [0x8089b679] ??:? _ZN19ForwardingStatement6acceptEP7Visitor [0x808930a9] ??:? _ZN22StatementRewriteWalker9visitStmtERP9Statement [0x8089ce43] ??:? _ZN22StatementRewriteWalker5visitEP17CompoundStatement [0x8089cf05] ??:? _ZN17CompoundStatement6acceptEP7Visitor [0x80892935] ??:? _ZN22StatementRewriteWalker9visitStmtERP9Statement [0x8089ce43] ??:? _ZN15FuncDeclaration9semantic3EP5Scope [0x8082e14c] ??:? _ZN6Module9semantic3EP5Scope [0x807d5995] ??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x8085755e] ??:? _Dmain [0x8085857a] ---- Works without `static`. Also fails with `static foreach (i; 0 .. 1) {}`. Tested with DMD64 D Compiler v2.075.0-rc1-190-ge3705e3d9.
Comment #1
by github-bugzilla — 2017-07-18T03:00:27Z
Commits pushed to master at
https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/425f129192605d53288190762ebd75a50a300a26
fix Issue 17660 - ICE with : AssertError@ddmd/visitor.d(39)
https://github.com/dlang/dmd/commit/af3eacf44280c8f368e6938c09cfae68e6489ee1
Merge pull request #7005 from tgehr/fix17660 Fix Issue 17660 - ICE with `static foreach`: AssertError@ddmd/visitor.d(39)
Comment #2
by github-bugzilla — 2017-08-07T13:17:32Z
Commits pushed to newCTFE at
https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/425f129192605d53288190762ebd75a50a300a26
fix Issue 17660 - ICE with : AssertError@ddmd/visitor.d(39)
https://github.com/dlang/dmd/commit/af3eacf44280c8f368e6938c09cfae68e6489ee1
Merge pull request #7005 from tgehr/fix17660
Comment #3
by github-bugzilla — 2017-08-16T13:23:47Z
Commits pushed to stable at
https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/425f129192605d53288190762ebd75a50a300a26
fix Issue 17660 - ICE with : AssertError@ddmd/visitor.d(39)
https://github.com/dlang/dmd/commit/af3eacf44280c8f368e6938c09cfae68e6489ee1
Merge pull request #7005 from tgehr/fix17660