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:
authorRaja R Harinath <harinath@hurrynot.org>2005-08-24 18:41:52 +0400
committerRaja R Harinath <harinath@hurrynot.org>2005-08-24 18:41:52 +0400
commit2f4b03e309aa202bb92472e0f64b1301bc1cbadc (patch)
tree625b9c5bb806f87f5170db4b587b005ed2e9a45b /mcs/tests/test-442.cs
parent578ea31824a8be679510d14dc2fe5d1a76348098 (diff)
In mcs:
Fix #75874. * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers. (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers. In tests: * test-442.cs: New test from #75874. svn path=/trunk/mcs/; revision=48775
Diffstat (limited to 'mcs/tests/test-442.cs')
-rw-r--r--mcs/tests/test-442.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/mcs/tests/test-442.cs b/mcs/tests/test-442.cs
new file mode 100644
index 00000000000..44968fe0de1
--- /dev/null
+++ b/mcs/tests/test-442.cs
@@ -0,0 +1,17 @@
+// Compiler options: -unsafe
+
+using System;
+
+namespace ConsoleApplication1 {
+ class Program {
+ static unsafe void Main(string[] args) {
+ int[] i = new int[] { 10 };
+ fixed (int* p = i) {
+ int*[] q = new int*[] { p };
+ *q[0] = 5;
+ Console.WriteLine(*q[0]);
+ }
+ }
+ }
+}
+