Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2008-03-19 14:12:21 +0300
committerMarek Safar <marek.safar@gmail.com>2008-03-19 14:12:21 +0300
commitac54dc8d39c5759c090c3a7f9c76a1b9738696ac (patch)
tree7d7be1baa0ce7c19cea483afb7801c33c2f6d30c /mcs/tests/test-621.cs
parent1b8aeb5fd77308c117a4c5ecf8b4e8bbc32c6fd5 (diff)
parentb251ce784aa16f7c3d52dfc4f334ee7b02f07c50 (diff)
New tests, migrated from errors.
svn path=/trunk/mcs/; revision=98583
Diffstat (limited to 'mcs/tests/test-621.cs')
-rw-r--r--mcs/tests/test-621.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/mcs/tests/test-621.cs b/mcs/tests/test-621.cs
new file mode 100644
index 00000000000..af24ecc011b
--- /dev/null
+++ b/mcs/tests/test-621.cs
@@ -0,0 +1,36 @@
+//
+// Fixed, incorporated into test
+//
+using System;
+
+using System.Runtime.InteropServices;
+
+[StructLayout (LayoutKind.Explicit)]
+struct A {
+ [FieldOffset (0)]
+ public int a;
+ [FieldOffset (0)]
+ public byte b1;
+ [FieldOffset (1)]
+ public byte b2;
+ [FieldOffset (2)]
+ public byte b3;
+ [FieldOffset (3)]
+ public byte b4;
+}
+
+class X {
+ static void Main ()
+ {
+ A a = new A ();
+
+ a.a = 0x12345678;
+
+ Console.WriteLine ("b1: " + a.b1);
+ Console.WriteLine ("b2: " + a.b2);
+ Console.WriteLine ("b3: " + a.b3);
+ Console.WriteLine ("b4: " + a.b4);
+
+ }
+}
+