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

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

//
// Test for http://bugzilla.ximian.com/show_bug.cgi?id=62263
//
// We need to make sure that pointer arth uses the size of X
// not the size of X*
//

using System;
unsafe struct X {
	int x, y, z;
	
	public static int Main ()
	{
		X* foo = null;
		
		if ((int) (foo + 1) != sizeof (X))
			return 1;
		return 0;
	}
}