Bug 21927 – ICE (illegal instruction) with static foreach over empty member template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-05-18T10:36:17Z
Last change time
2021-06-11T17:17:51Z
Keywords
ice, pull
Assigned to
No Owner
Creator
Vladimir Panteleev

Comments

Comment #0 by dlang-bugzilla — 2021-05-18T10:36:17Z
//////////////// test.d /////////////// struct S { template tpl() { } void fun() { static foreach (p; this.tpl!()) { } } } /////////////////////////////////////// Compilation fails with: be = '.' this.tpl!() at [test.d(9)] [1] 3724069 illegal hardware instruction (core dumped) dmd -o- test.d For whatever reason, the "this." is important.
Comment #1 by dlang-bot — 2021-05-20T17:38:16Z
@BorisCarvajal created dlang/dmd pull request #12544 "Fix Issue 21927 - ICE (illegal instruction) with static foreach over empty member template" fixing this issue: - Fix Issue 21927 - ICE (illegal instruction) with static foreach over empty member template https://github.com/dlang/dmd/pull/12544
Comment #2 by dlang-bot — 2021-05-21T09:33:27Z
dlang/dmd pull request #12544 "Fix Issue 21927 - ICE (illegal instruction) with static foreach over empty member template" was merged into stable: - 53a658b204c5f0ea2a3cc7d22da17b9054cc146a by Boris Carvajal: Fix Issue 21927 - ICE (illegal instruction) with static foreach over empty member template https://github.com/dlang/dmd/pull/12544
Comment #3 by dlang-bot — 2021-05-30T03:01:45Z
dlang/dmd pull request #12600 "merge stable" was merged into master: - 1a8fc5ea67acfbd697852df4b31c1cb2a39a3452 by Boris Carvajal: Fix Issue 21927 - ICE (illegal instruction) with static foreach over empty member template https://github.com/dlang/dmd/pull/12600
Comment #4 by dlang-bot — 2021-06-11T17:17:51Z
dlang/dmd pull request #12668 "[dmd-cxx] Backport recent bug fixes for static foreach ICEs" was merged into dmd-cxx: - 0043a6e5aa69f5ad02776e5f95f2464c08aee1bb by Boris Carvajal: [dmd-cxx] Fix Issue 21927 - ICE (illegal instruction) with static foreach over empty member template https://github.com/dlang/dmd/pull/12668