www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21995] New: Struct with size uint.max or greater causes ICE

https://issues.dlang.org/show_bug.cgi?id=21995

          Issue ID: 21995
           Summary: Struct with size uint.max or greater causes ICE
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: snarwin+bugzilla gmail.com

Attempting to compile the following program with DMD 2.097.0 results in an ICE:

---
// S.sizeof == uint.max (0xffffffff)
struct S
{
    ubyte[0x7ffffffe] a;
    ubyte[0x7ffffffe] b;
    ubyte[3] c;
}
---

The compiler crashes with no output and an exit code of 132 ("Illegal
instruction"), most likely as the result of hitting an `assert(0)`.

--
Jun 05