[Mono-bugs] [Bug 65657][Nor] Changed - ldelema <ref> buggy with AOT

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 9 Sep 2004 22:39:33 -0400 (EDT)


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 bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=65657

--- shadow/65657	2004-09-09 18:25:04.000000000 -0400
+++ shadow/65657.tmp.871	2004-09-09 22:39:33.000000000 -0400
@@ -1,23 +1,23 @@
 Bug#: 65657
 Product: Mono: Runtime
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: miguel@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: AOT mcs produces buggy mcs.
+Summary: ldelema <ref> buggy with AOT
 
 Ahead-of-Time compiling mcs.exe will produce an mcs that crashes:
 
 (tried both with -O=all and without it):
 
 mono$ mono  --aot mcs.exe
@@ -47,6 +47,40 @@
 (Mono.CSharp.EmitContext,Mono.CSharp.Attributable)
 in <0x00078> Mono.CSharp.CommonAssemblyModulClass:Emit
 (Mono.CSharp.TypeContainer)
 in <0x00248> Mono.CSharp.RootContext:EmitCode ()
 in <0x00cfd> Mono.CSharp.Driver:MainDriver (string[])
 in <0x0000f> Mono.CSharp.Driver:Main (string[])
+
+------- Additional Comments From bmaurer@users.sf.net  2004-09-09 22:39 -------
+Simpler:
+
+class A {
+	static void Main ()
+	{
+		string [] x = new string [5];
+		X (ref x [0]);
+	}
+	static void X (ref string x) {}
+}
+
+[benm@Ben benm]$ mcs t.cs
+Compilation succeeded
+[benm@Ben benm]$ mono t.exe
+[benm@Ben benm]$ mono --aot t.exe
+Mono Ahead of Time compiler - compiling assembly /home/benm/t.exe
+Executing the native assembler: as /tmp/mono_aot_pNcFlA -o
+/tmp/mono_aot_pNcFlA. o
+Executing the native linker: ld -shared -o /home/benm/t.exe.so
+/tmp/mono_aot_pNc FlA.o
+Compiled 3 out of 3 methods (100%)
+0 methods contain absolute addresses (0%)
+0 methods contain wrapper references (0%)
+0 methods contain lmf pointers (0%)
+0 methods have other problems (0%)
+AOT RESULT 0
+[benm@Ben benm]$ mono t.exe
+ 
+Unhandled Exception: System.ArrayTypeMismatchException: Source array
+type cannot be assigned to destination array type.
+in <0x0002d> A:Main ()
+