X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Ftest-anon-70.cs;h=d0fe4b7a07a7e3867f65815af18f0fe09b435a9a;hb=HEAD;hp=414ae0e99c055eb057c50c3990ff297ab9950aa6;hpb=a63fe1753abc0e598b1100160cf2ca8db47054b2;p=mono.git diff --git a/mcs/tests/test-anon-70.cs b/mcs/tests/test-anon-70.cs index 414ae0e99c0..d0fe4b7a07a 100644 --- a/mcs/tests/test-anon-70.cs +++ b/mcs/tests/test-anon-70.cs @@ -1,7 +1,17 @@ +// Compiler options: -unsafe + // Cloning tests using System; +unsafe class UnsafeClass +{ + public int* GetUnsafeValue () + { + return null; + } +} + public class C { delegate void D (); @@ -10,6 +20,18 @@ public class C { } + unsafe static void UnsafeTests () + { + UnsafeClass v = new UnsafeClass (); + Test (delegate () { + int i = *v.GetUnsafeValue (); + }); + + Test (delegate () { + byte* buffer = stackalloc byte[8192]; + }); + } + public static void Main () { Exception diffException; @@ -40,3 +62,4 @@ public class C } } +