[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-793.cs
bloba52c0a72b201a6cc31925ba03be6f36e9a6ecbda
1 // Compiler options: -unsafe
3 using System;
5 namespace MonoPointerBugTest
7 struct MyStructure
9 int q;
10 int z;
11 int a;
14 class Program
16 public static int Main ()
18 unsafe {
19 MyStructure structure = new MyStructure ();
21 MyStructure* pointer1 = &structure;
22 MyStructure* pointer2 = pointer1;
24 //on the Mac this works like: pointer2++;
25 pointer2 += 10;
27 int difference = (int) ((byte*) pointer2 - (byte*) pointer1);
28 if (difference != 120)
29 return 1;
31 return 0;