Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

25 lines
357 B
C#

// Compiler options: -unsafe
using System;
using System.Runtime.InteropServices;
class UnsafeTest
{
[StructLayout (LayoutKind.Sequential)]
public unsafe struct Foo
{
public Bar* bar;
}
[StructLayout (LayoutKind.Sequential)]
public struct Bar
{
public Foo foo;
}
unsafe public static void Main ()
{
Console.WriteLine (sizeof (Foo));
}
}