1 // Compiler options: -unsafe
4 // This test excercises stackalloc, some pointer arithmetic,
9 public static int Main ()
11 char *ptr
= stackalloc char [10];
18 for (i
= 0; i
< 10; i
++)
19 ptr
[i
] = (char) (i
+ 10);
21 for (i
= 0; i
< 10; i
++){
22 if (*ptr
!= (char) (i
+ 10))
28 // Now test index access with longs
38 // Try to compile non-int values
40 byte* bptr
= (byte*) 5;
42 byte* ret
= (byte*) (bptr
+ us
);
44 Console
.WriteLine ("Ok");