June 08, 2021
https://issues.dlang.org/show_bug.cgi?id=22005

          Issue ID: 22005
           Summary: ICE: Segmentation fault with static foreach and
                    -betterC
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: ibuclaw@gdcproject.org

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)
    {
    }
}

--