This D2 program: double[7_000_000] array = void; void main() {} DMD 2.055 gives an expected error message: test.d(1): Error: index 7000000 overflow for static array But this similar program: struct Foo { double x /*= 0*/; } Foo[7_000_000] array = void; void main() {} Causes a crash of optlink at EIP=004114FC.
*** Issue 8536 has been marked as a duplicate of this issue. ***
Apart from the linker crash this could also be a DMD accepts-invalid bug.
(In reply to bearophile_hugs from comment #0) > But this similar program: > [...] > Causes a crash of optlink at EIP=004114FC. Now causes: test.d(4): Error: variable test.array size of 0x3567e00 exceeds max allowed size 0x1000000