[Mono-bugs] [Bug 38908][Nor] New - incorrect code generated for assignment of field of nested struct
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 28 Feb 2003 14:32:51 -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 vargaz@freemail.hu.
http://bugzilla.ximian.com/show_bug.cgi?id=38908
--- shadow/38908 Fri Feb 28 14:32:51 2003
+++ shadow/38908.tmp.16390 Fri Feb 28 14:32:51 2003
@@ -0,0 +1,41 @@
+Bug#: 38908
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vargaz@freemail.hu
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: incorrect code generated for assignment of field of nested struct
+
+mcs generates incorrect code from the following:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+struct Bar {
+ public int a;
+};
+
+struct Foo {
+ public Bar bar;
+};
+
+class Bug {
+
+ Foo foo;
+
+ public void func () {
+ foo.bar.a = 5;
+ }
+}
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+csc generates ldflda+ldflda, while mcs generates ldfld+ldflda which is
+wrong.