About half a billion. Attempting to compile the following:
int arr[2147483647];
Produces the error:
total size of array must not exceed 0x7fffffff bytes
Attempting to compile the following:
int arr[2147483647 / 4];
Produces the error:
automatic allocation exceeds 2G
Attempting to compile the following:
int arr[2147483647 / 4 - 1];
Produces the error:
An internal error has occurred in the compiler.
Attempting to compile the following:
int arr[2147483647 / 4 - 50];
Caused an error dialog to pop up (I think the compiler threw an exception). The following compiled fine:
int arr[2147483647 / 4 - 200];