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

test-603.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c32bfb8b6745f418131f20e7d54cc746a02bd1d3 (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
28
29
30
// Compiler options: -unsafe

using System;

namespace ConsoleApplication1
{
	public struct Strct
	{
		public uint a;
		public uint b;
	}
	
	unsafe class Program
	{
		static Strct* ptr = null;
		
		static int Main ()
		{
			Strct* values = ptr;
			values++;
			values++;
			
			long diff = values - ptr;
			if (diff != 2)
				return 1;
			
			return 0;
		}
	}
}