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

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

using System;

class MainClass
{
	static int called;

	public static double[] GetTempBuffer ()
	{
		++called;
		return new double[4];
	}

	public static int Main ()
	{
		unsafe {
			fixed (double* dummy = GetTempBuffer()) {
			}
		}

		if (called != 1)
			return 1;

		return 0;
	}
}