diff options
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index 97202372c77..33ef36b6d5c 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -145,6 +145,12 @@ public struct AStruct : ITest2 { } } + +public struct BlittableStruct { + public int i; + public double d; +} + public class GClass<T> { public T field; public static T static_field; @@ -349,6 +355,7 @@ public class Tests : TestsBase, ITest2 gc_suspend (); set_ip (); step_filters (); + pointers (); if (args.Length > 0 && args [0] == "local-reflect") local_reflect (); if (args.Length > 0 && args [0] == "domain-test") @@ -1761,6 +1768,18 @@ public class Tests : TestsBase, ITest2 static void step_out_void_async_2 () { } + + public static unsafe void pointer_arguments (int* a, BlittableStruct* s) { + *a = 0; + } + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public static unsafe void pointers () { + int[] a = new [] {1,2,3}; + BlittableStruct s = new BlittableStruct () { i = 2, d = 3.0 }; + fixed (int* pa = a) + pointer_arguments (pa, &s); + } } public class SentinelClass : MarshalByRefObject { |