www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23233] New: Compiler hangs when current static array limit

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

          Issue ID: 23233
           Summary: Compiler hangs when current static array limit reaches
                    the edge
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: contact lsferreira.net

The following code hangs the compiler with either a segmentation fault or a
linker relocation error on a unrelated PC relative address symbol. I can't
reproduce the segmentation fault locally, but both run.dlang.io and godbolt.org
seem to hang with a segmentation fault.

```
struct S {
    ubyte[int.max - 1] value;
}

void main() {}
```

--
Jul 08 2022