Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-339.cs
1 // Compiler options: -unsafe
2
3 using System;
4
5 struct SS
6 {
7 }
8
9 public class C
10 {
11         public static int[] field = new int [] { 66 };
12
13         public static int Main()
14         {
15                 unsafe {
16                         SS* ss = stackalloc SS [10];
17                         SS* s1 = &ss [5];
18             
19                         int* values = stackalloc int[20];
20                         int* p = &values[1];
21                         int* q = &values[15];
22
23                         Console.WriteLine("p - q = {0}", p - q);
24                         Console.WriteLine("q - p = {0}", q - p);
25                 }
26                 return 0;
27         }
28 }
29