Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-652.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a6f52f3460df10662bb102d07695770d4436dbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Compiler options: -unsafe

using System;

class C
{
	public static int Main ()
	{
		return Test ();
	}

	public static unsafe int Test ()
	{
		// Test: Unsafe local variable is initialized to 0
		int* v = stackalloc int [5];
		Console.WriteLine (v [0]);
		return v [0] + v [1] + v [4];
	}
}