[Mono-bugs] [Bug 26495][Nor] New - should not use the ldlen opcode with System.Array

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 Jun 2002 20:24:59 -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=26495

--- shadow/26495	Wed Jun 19 16:24:59 2002
+++ shadow/26495.tmp.29672	Wed Jun 19 16:24:59 2002
@@ -0,0 +1,32 @@
+Bug#: 26495
+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: should not use the ldlen opcode with System.Array
+
+Compile with mcs on either platform. mcs should call the property
+and not use ldlen instead of Length.
+
+class T {
+        static int l (System.Array a) {
+                return a.Length;
+        }
+        static int Main() {
+                int len = l (new int [1]);
+                if (len != 1)
+                        return 1;
+                return 0;
+        }
+}