Make static int[] a = [1, 2]; a[0] = 4; not segfault

by making the array data ptr a non-const global variable.
This commit is contained in:
Christian Kamm
2009-05-03 11:16:54 +02:00
parent c831367b24
commit 77100f890c
3 changed files with 15 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
void main()
{
static int[] b = [1, 2];
b[0] = 2;
typedef int[] ia = [1,2];
static ia a;
a[0] = 5;
}