[Mono-bugs] [Bug 75874][Nor] New - mcs incorrectly uses stelem.ref
for pointer arrays.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Aug 22 05:29:21 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by lupus at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75874
--- shadow/75874 2005-08-22 05:29:21.000000000 -0400
+++ shadow/75874.tmp.10976 2005-08-22 05:29:21.000000000 -0400
@@ -0,0 +1,36 @@
+Bug#: 75874
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: lupus at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs incorrectly uses stelem.ref for pointer arrays.
+
+Consider the following program posted on the list:
+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]);
+ }
+ }
+ }
+}
+
+mcs will emit stelem.ref to store into the array instead of stelem.i.
+The load is similarly broken: ldelem.ref instead of ldelem.i.
More information about the mono-bugs
mailing list