2004-08-03 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / tests / unsafe-9.cs
1 //
2 // Test for http://bugzilla.ximian.com/show_bug.cgi?id=62263
3 //
4 // We need to make sure that pointer arth uses the size of X
5 // not the size of X*
6 //
7
8 using System;
9 unsafe struct X {
10         int x, y, z;
11         
12         static int Main ()
13         {
14                 X* foo = null;
15                 
16                 if ((int) (foo + 1) != sizeof (X))
17                         return 1;
18                 return 0;
19         }
20 }