[Mono-bugs] [Bug 59188][Blo] Changed - mcs generates wrong IL (Error in IL codes )

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 27 May 2004 11:33:14 -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 totte@hiddenpeaks.com.

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

--- shadow/59188	2004-05-27 11:22:01.000000000 -0400
+++ shadow/59188.tmp.29393	2004-05-27 11:33:14.000000000 -0400
@@ -1,23 +1,23 @@
 Bug#: 59188
-Product: Mono: Runtime
+Product: Mono: Compilers
 Version: unspecified
 OS: GNU/Linux [Other]
 OS Details: 
 Status: NEW   
 Resolution: 
 Severity: Unknown
-Priority: Major
-Component: misc
+Priority: Blocker
+Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: meddochat@zonnet.nl               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Error in IL codes
+Summary: mcs generates wrong IL (Error in IL codes )
 
 Description of Problem:
   When executing the included source i get the following error:
   ** ERROR **: Invalid IL code at IL0006 in Proef:Main (): IL_0006: ldarg.0
 
 source file:
@@ -54,6 +54,30 @@
 --- END SOURCE FILE ---
 
 compile this and i hope you get the same error as i did.
 
 ------- Additional Comments From totte@hiddenpeaks.com  2004-05-27 11:22 -------
 Confirmed on Linux / Intel (RH9)
+
+------- Additional Comments From totte@hiddenpeaks.com  2004-05-27 11:33 -------
+We generate :
+
+  .entrypoint
+  // Code size       25 (0x19)
+  .maxstack  4
+  .locals init (class Proef V_0)
+  IL_0000:  newobj     instance void Proef::.ctor()
+  IL_0005:  stloc.0
+  IL_0006:  ldarg.0
+  IL_0007:  ldnull
+  IL_0008:  ldftn      void Proef::Temp(object,
+                                        class [mscorlib]
+System.EventArgs)
+  IL_000e:  newobj     instance void [mscorlib]
+System.EventHandler::.ctor(object,
+                                                                      
+    native int)
+  IL_0013:  call       instance void Proef::add_OnDoSomething(class 
+[mscorlib]System.EventHandler)
+  IL_0018:  ret
+
+look at il_006: ldarg.0, csc generated ldloc.0 (feels more correct ;-)