Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-621.cs
1 // 
2 // Fixed, incorporated into test
3 //
4 using System;
5
6 using System.Runtime.InteropServices;
7
8 [StructLayout (LayoutKind.Explicit)]
9 struct A {
10         [FieldOffset (0)]
11         public int a;
12         [FieldOffset (0)]
13         public byte b1;
14         [FieldOffset (1)]
15         public byte b2;
16         [FieldOffset (2)]
17         public byte b3;
18         [FieldOffset (3)]
19         public byte b4;
20 }
21
22 class X {
23         public static void Main ()
24         {
25                 A a = new A ();
26
27                 a.a = 0x12345678;
28
29                 Console.WriteLine ("b1: " + a.b1);
30                 Console.WriteLine ("b2: " + a.b2);
31                 Console.WriteLine ("b3: " + a.b3);
32                 Console.WriteLine ("b4: " + a.b4);
33                 
34         }
35 }
36