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

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

using System;

class Program
{
	static unsafe public int Main ()
	{
		return Test ((sbyte*) (-1));
	}

	static unsafe int Test (sbyte* x)
	{
		if ((x + 1) < x) {
			Console.WriteLine ("OK");
			return 0;
		} else {
			Console.WriteLine ("BAD");
			return 1;
		}
	}
}