X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Fgtest-353.cs;h=42d0603a1ae8a11bbede128cfe01264b659b08ff;hb=f815427d73444a80d0b0bf9a8c8605a8814200e8;hp=c122cc1fae3c3631573bf453f125ed3743d02b4c;hpb=9d94ef745654af93546b585ab66b3f2638defdcb;p=mono.git diff --git a/mcs/tests/gtest-353.cs b/mcs/tests/gtest-353.cs index c122cc1fae3..42d0603a1ae 100644 --- a/mcs/tests/gtest-353.cs +++ b/mcs/tests/gtest-353.cs @@ -1,46 +1,27 @@ -// Compiler options: -unsafe - using System; -using System.Runtime.InteropServices; -namespace Bug +class A { - [StructLayout (LayoutKind.Sequential, Pack = 1)] - public unsafe struct xxx + public virtual void Foo () where T : D2 { - internal fixed byte zzz [5]; } +} + +class B : A +{ +} - internal class RedSkyTimeCode +class C : B +{ + public override void Foo () { - public unsafe void CopyTo (xxx* dest) - { - fixed (ulong* p = &_rep) { - byte* pb = (byte*) p; - dest->zzz [0] = pb [0]; - dest->zzz [1] = pb [1]; - dest->zzz [2] = pb [2]; - dest->zzz [3] = pb [3]; - dest->zzz [4] = pb [4]; - } - } - - public static unsafe void Convert (xxx* src, ulong* dest) - { - byte* pb = (byte*) dest; - *dest = 0L; - pb [0] = src->zzz [0]; - pb [1] = src->zzz [1]; - pb [2] = src->zzz [2]; - pb [3] = src->zzz [3]; - pb [4] = src->zzz [4]; - } - - private ulong _rep; - - public static void Main () - { - } } } +public class Program +{ + static void Main () + { + new C ().Foo (); + } +}