1 // Compiler options: -unsafe -r:fixed-buffer-dll.dll
5 public unsafe struct TestNew {
6 private fixed char test_1 [128];
7 public fixed bool test2 [4];
9 public fixed int T [2];
10 public fixed bool test20 [4], test21 [40];
12 private int foo, foo2;
13 public void SetTest () {
14 fixed (char* c = test_1) {
21 unsafe static int Test () {
22 TestNew tt = new TestNew ();
29 ExternalStruct es = new ExternalStruct ();
30 es.double_buffer [1] = 999999.8888;
31 es.double_buffer [0] = es.double_buffer [1];
34 if (Attribute.GetCustomAttribute (typeof (TestNew).GetField ("test2"), typeof (System.Runtime.CompilerServices.FixedBufferAttribute)) == null)
38 if (typeof (TestNew).GetNestedTypes ().Length != 5)
41 foreach (Type t in typeof (TestNew).GetNestedTypes ()) {
42 if (Attribute.GetCustomAttribute (t, typeof (System.Runtime.CompilerServices.CompilerGeneratedAttribute)) == null)
46 Console.WriteLine ("OK");
50 public static int Main () {