[Mono-bugs] [Bug 27549][Maj] New - Access to fields address in structs generates incorrect code

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
9 Jul 2002 11:02:05 -0000


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=27549

--- shadow/27549	Tue Jul  9 07:02:05 2002
+++ shadow/27549.tmp.11030	Tue Jul  9 07:02:05 2002
@@ -0,0 +1,32 @@
+Bug#: 27549
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Access to fields address in structs generates incorrect code
+
+The following test will generate incorrect code in GetHashCode(), but not
+in the stuff() method.
+struct T {
+        int bits;
+        public override int GetHashCode () {
+                return bits.GetHashCode();
+        }
+        int stuff () {
+                return bits;
+        }
+        static void Main() {}
+}
+It works with s/struct/class/. The bug happens with either runtime and itis
+present in the mcs-generated System.dll.