2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / tests / unsafe-4.cs
1 // Compiler options: -unsafe
2
3 unsafe class X {
4         static int v;
5         static int v_calls;
6         
7         static int* get_v ()
8         {
9                 v_calls++;
10                 return &v;
11         }
12         
13         static int Main ()
14         {
15                 if ((*get_v ())++ != 0)
16                         return 1;
17                 if (v != 1)
18                         return 2;
19                 if (v_calls != 1)
20                         return 3;
21                 return 0;
22         }
23 }