Summary: OPTLINK crash with large fixed-size array
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Optlink

--- Comment #0 from 2012-08-10 15:43:19 PDT ---
This program:

uint[1 << 24] a;
void main() {}

Gives this error:
test.d(2): Error: index 16777216 overflow for static array

While this program:

struct Foo { uint x; }
Foo[1 << 24] a;
void main() {}

Causes an OPTLINK crash.

I sometimes translate to D some C programs that for performance reasons use
some large global 2D arrays. In D using a global __gshared dynamic array of
dynamic arrays is an option, but this kills some optimizations the compiler is
able to perform thanks to knowing the 2D matrix sizes at compile-time. In my
opinion asking for 50-100 MB static 2D arrays is not that much for a PC with 2+

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to