[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / test-404.cs
blobc1fa56f67949c455ddc6742dfa4e79b86bfb1773
1 // Compiler options: -unsafe
3 unsafe class X {
4 static int v;
5 static int v_calls;
7 static int* get_v ()
9 v_calls++;
10 fixed (int* ptr = &v)
12 return ptr;
16 public static int Main ()
18 if ((*get_v ())++ != 0)
19 return 1;
20 if (v != 1)
21 return 2;
22 if (v_calls != 1)
23 return 3;
24 return 0;