Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

30 lines
422 B
C#

// Compiler options: -unsafe
using System;
struct SS
{
}
public class C
{
public static int[] field = new int [] { 66 };
public static int Main()
{
unsafe {
SS* ss = stackalloc SS [10];
SS* s1 = &ss [5];
int* values = stackalloc int[20];
int* p = &values[1];
int* q = &values[15];
Console.WriteLine("p - q = {0}", p - q);
Console.WriteLine("q - p = {0}", q - p);
}
return 0;
}
}