Bug 22005 – ICE: Segmentation fault with static foreach and -betterC

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-08T13:32:05Z
Last change time
2021-06-11T17:17:53Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-06-08T13:32:05Z
When `class TypeInfo` doesn't exist, an ICE occurs during the generation of this static foreach loop. --- module object; void main() { enum int[4] foo = [1,2,3,4]; static foreach (i, e; foo) { } }
Comment #1 by dlang-bot — 2021-06-09T07:40:44Z
@ibuclaw created dlang/dmd pull request #12656 "fix Issue 22005 - ICE: Segmentation fault with static foreach and -betterC" fixing this issue: - fix Issue 22005 - ICE: Segmentation fault with static foreach and -betterC https://github.com/dlang/dmd/pull/12656
Comment #2 by dlang-bot — 2021-06-09T09:57:29Z
dlang/dmd pull request #12656 "fix Issue 22005 - ICE: Segmentation fault with static foreach and -betterC" was merged into master: - 5ab583a8693357f5954978df739e41f832b4ac8e by Iain Buclaw: fix Issue 22005 - ICE: Segmentation fault with static foreach and -betterC https://github.com/dlang/dmd/pull/12656
Comment #3 by dlang-bot — 2021-06-11T17:17:53Z
dlang/dmd pull request #12668 "[dmd-cxx] Backport recent bug fixes for static foreach ICEs" was merged into dmd-cxx: - f384278f072248c3a7e98a17f0753f090f40b7f0 by Iain Buclaw: [dmd-cxx] fix Issue 22005 - ICE: Segmentation fault with static foreach and -betterC https://github.com/dlang/dmd/pull/12668