fix bootstrap
[mcs.git] / tests / test-688.cs
blob5907aee9da9ecd7f075e48dede6d984b3d1a0f6d
1 // Compiler options: -unsafe
3 using System;
5 unsafe class Test
7 public static unsafe byte* GetFoo ()
9 byte *one = (byte*)1;
10 return 1 + one;
13 public static unsafe byte* GetFoo2 ()
15 byte *one = (byte*)3;
16 return one + 3;
19 public static int Main()
21 int b = (int)GetFoo ();
22 Console.WriteLine (b);
23 if (b != 2)
24 return 1;
26 b = (int)GetFoo2 ();
27 Console.WriteLine (b);
28 if (b != 6)
29 return 2;
31 return 0;