[Mono-bugs] [Bug 37473][Nor] New - incorrect code generated when accessing the fields of a valuetype
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 31 Jan 2003 13:45:13 -0500 (EST)
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@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=37473
--- shadow/37473 Fri Jan 31 13:45:12 2003
+++ shadow/37473.tmp.11419 Fri Jan 31 13:45:12 2003
@@ -0,0 +1,45 @@
+Bug#: 37473
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lupus@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: incorrect code generated when accessing the fields of a valuetype
+
+The time.cs sample in the test suite fails with mini because
+mcs generates incorrect code in some cases in the DateTime methods.
+The following sample reproduces the error:
+using System;
+struct TS {
+ long ticks;
+ public long Ticks {
+ get {return ticks;}
+ }
+}
+struct DT {
+ TS t;
+ public long Ticks {
+ get {return t.Ticks;}
+ }
+}
+class T {
+ static void Main () {
+ DT t = new DT ();
+ Console.WriteLine (t.Ticks);
+ }
+}
+
+You can check with the command:
+./metadata/pedump --verify code simple-time2.exe
+or with PEVerify on windows: there is an extraneous ldobj opcode
+in the DT::get_Ticks method.